diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-09-22 10:16:21 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-10-05 12:30:48 +0200 |
commit | 4ed882fb404c3f1eb68820d69a1ce28ca93f9ab3 (patch) | |
tree | 98064ca5e58dc9a28dacbf1ad2066094f0740f20 /modules | |
parent | /views/*/options: fix when used with e.g. tags (diff) | |
download | knot-resolver-4ed882fb404c3f1eb68820d69a1ce28ca93f9ab3.tar.xz knot-resolver-4ed882fb404c3f1eb68820d69a1ce28ca93f9ab3.zip |
tests: fix config.hints after view changes
It seems such an edge case that I chose to avoid the issue this way.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/hints/tests/hints.test.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/hints/tests/hints.test.lua b/modules/hints/tests/hints.test.lua index b62e502d..eda53c71 100644 --- a/modules/hints/tests/hints.test.lua +++ b/modules/hints/tests/hints.test.lua @@ -1,5 +1,6 @@ -- SPDX-License-Identifier: GPL-3.0-or-later local utils = require('test_utils') +local C = require('ffi').C -- setup resolver modules = { 'hints > iterate' } @@ -36,6 +37,9 @@ local function test_nxdomain() hints.config() -- clean start hints.use_nodata(false) hints.add_hosts('hints.test.hosts') + -- We commit manually, as in these tests we query before loading config finishes. + C.kr_rules_commit(true) + -- 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) @@ -50,6 +54,7 @@ local function test_nodata() hints.config() -- clean start hints.use_nodata(true) -- default ATM but let's not depend on that hints['myname.lan'] = '2001:db8::1' + C.kr_rules_commit(true) utils.check_answer('another type gives NODATA', 'myname.lan', kres.type.MX, utils.NODATA) utils.check_answer('record itself is OK', |