]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
hints tests: simple check of comment parsing
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 24 Jun 2022 07:26:31 +0000 (09:26 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 7 Jul 2022 17:12:28 +0000 (19:12 +0200)
modules/hints/tests/hints.test.hosts [new file with mode: 0644]
modules/hints/tests/hints.test.lua

diff --git a/modules/hints/tests/hints.test.hosts b/modules/hints/tests/hints.test.hosts
new file mode 100644 (file)
index 0000000..0111507
--- /dev/null
@@ -0,0 +1 @@
+192.0.2.1 myname.lan # badname.lan and the rest of the comment
index ed97bc45a4abce614e215d132c4e7a98e34bd701..b62e502dd8e56a7f9b5b4671b6693120f75b23ca 100644 (file)
@@ -35,7 +35,7 @@ end
 local function test_nxdomain()
        hints.config() -- clean start
        hints.use_nodata(false)
-       hints['myname.lan'] = '192.0.2.1'
+       hints.add_hosts('hints.test.hosts')
        -- TODO: prefilling or some other way of getting NXDOMAIN (instead of SERVFAIL)
        utils.check_answer('bad name gives NXDOMAIN',
                'badname.lan', kres.type.A, kres.rcode.SERVFAIL)