Skip to content
Snippets Groups Projects
Verified Commit bee22317 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

dns64 tests: fix by setting hints.ttl() explicitly

parent becabe29
No related branches found
No related tags found
1 merge request!756modules/hints: allow overriding the TTL
Pipeline #44754 failed
......@@ -4,6 +4,7 @@ local condition = require('cqueues.condition')
modules = { 'hints', 'dns64' }
hints['dns64.example'] = '192.168.1.1'
hints.use_nodata(true) -- Respond NODATA to AAAA query
hints.ttl(60)
dns64.config('fe80::21b:77ff:0:0')
-- helper to wait for query resolution
......@@ -37,7 +38,7 @@ local function test_builtin_rules()
local rcode, answers = wait_resolve('dns64.example', kres.type.AAAA)
same(rcode, kres.rcode.NOERROR, 'dns64.example returns NOERROR')
same(#answers, 1, 'dns64.example synthesised answer')
local expect = {'dns64.example.', '0', 'AAAA', 'fe80::21b:77ff:c0a8:101'}
local expect = {'dns64.example.', '60', 'AAAA', 'fe80::21b:77ff:c0a8:101'}
if #answers > 0 then
local rr = {kres.rr2str(answers[1]):match('(%S+)%s+(%S+)%s+(%S+)%s+(%S+)')}
same(rr, expect, 'dns64.example synthesised correct AAAA record')
......@@ -49,4 +50,4 @@ local tests = {
test_builtin_rules,
}
return tests
\ No newline at end of file
return tests
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment