]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests/config: doh2 - use tabs for indentation
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 2 Oct 2020 08:02:17 +0000 (10:02 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 13 Oct 2020 10:55:30 +0000 (12:55 +0200)
tests/config/doh2.test.lua

index 8461db50b27aba6b93391d2f12b83d7952c74184..80e76ec5b2453272d3314401bb9b8f8010b99730 100644 (file)
@@ -246,32 +246,32 @@ else
                same(pkt:nscount(), 1, desc .. ': AUTHORITY is present')
        end
 
-        local function test_get_other_params_before_dns()
-                local desc = 'GET query with other parameters before dns is valid'
-                local req = req_templ:clone()
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path',
+       local function test_get_other_params_before_dns()
+               local desc = 'GET query with other parameters before dns is valid'
+               local req = req_templ:clone()
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path',
                '/doh?other=something&another=something&dns=vMEBAAABAAAAAAAAB25vZXJyb3IEdGVzdAAAAQAB')
-                check_ok(req, desc)
-        end
-
-        local function test_get_other_params_after_dns()
-                local desc = 'GET query with other parameters after dns is valid'
-                local req = req_templ:clone()
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path',
+               check_ok(req, desc)
+       end
+
+       local function test_get_other_params_after_dns()
+               local desc = 'GET query with other parameters after dns is valid'
+               local req = req_templ:clone()
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path',
                '/doh?dns=vMEBAAABAAAAAAAAB25vZXJyb3IEdGVzdAAAAQAB&other=something&another=something')
-                check_ok(req, desc)
-        end
-
-        local function test_get_other_params()
-                local desc = 'GET query with other parameters than dns on both sides is valid'
-                local req = req_templ:clone()
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path',
+               check_ok(req, desc)
+       end
+
+       local function test_get_other_params()
+               local desc = 'GET query with other parameters than dns on both sides is valid'
+               local req = req_templ:clone()
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path',
                '/doh?other=something&dns=vMEBAAABAAAAAAAAB25vZXJyb3IEdGVzdAAAAQAB&another=something')
-                check_ok(req, desc)
-        end
+               check_ok(req, desc)
+       end
 
        -- test an invalid DNS query using GET
                local function test_get_long_input()
@@ -289,25 +289,25 @@ else
        end
 
        local function test_get_unparseable()
-                local req = assert(req_templ:clone())
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path', '/doh??dns=' .. basexx.to_url64(string.rep('\0', 1024)))
-                check_err(req, '400', 'unparseable GET finishes with 400')
-        end
+               local req = assert(req_templ:clone())
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path', '/doh??dns=' .. basexx.to_url64(string.rep('\0', 1024)))
+               check_err(req, '400', 'unparseable GET finishes with 400')
+       end
 
        local function test_get_invalid_b64()
-                local req = assert(req_templ:clone())
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path', '/doh?dns=thisisnotb64')
-                check_err(req, '400', 'GET with invalid base64 finishes with 400')
-        end
+               local req = assert(req_templ:clone())
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path', '/doh?dns=thisisnotb64')
+               check_err(req, '400', 'GET with invalid base64 finishes with 400')
+       end
 
        local function test_get_invalid_chars()
-                local req = assert(req_templ:clone())
-                req.headers:upsert(':method', 'GET')
-                req.headers:upsert(':path', '/doh?dns=' .. basexx.to_url64(string.rep('\0', 200)) .. '@#$%?!')
-                check_err(req, '400', 'GET with invalid characters in b64 finishes with 400')
-        end
+               local req = assert(req_templ:clone())
+               req.headers:upsert(':method', 'GET')
+               req.headers:upsert(':path', '/doh?dns=' .. basexx.to_url64(string.rep('\0', 200)) .. '@#$%?!')
+               check_err(req, '400', 'GET with invalid characters in b64 finishes with 400')
+       end
 
        local function test_unsupp_method()
                local req = assert(req_templ:clone())