diff options
Diffstat (limited to 'tests/deckard/template/kresd.j2')
-rw-r--r-- | tests/deckard/template/kresd.j2 | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/tests/deckard/template/kresd.j2 b/tests/deckard/template/kresd.j2 new file mode 100644 index 0000000..4d5a877 --- /dev/null +++ b/tests/deckard/template/kresd.j2 @@ -0,0 +1,111 @@ +net = { '{{SELF_ADDR}}' } +modules = {'stats', 'policy', 'hints'} +-- test. domain is used by some tests, allow it +policy.add(policy.suffix(policy.PASS, {todname('test.')})) +-- extra verbose logging for answers received from network +policy.add(policy.all(policy.QTRACE)) +cache.size = 2*MB +hints.root({['k.root-servers.net'] = '{{ROOT_ADDR}}'}) +{% if QMIN == "false" %} +option('NO_MINIMIZE', true) +{% else %} +option('NO_MINIMIZE', false) +{% endif %} +{% if DO_NOT_QUERY_LOCALHOST == "false" %} +option('ALLOW_LOCAL', true) +{% else %} +option('ALLOW_LOCAL', false) +{% endif %} + +{% if HARDEN_GLUE == "true" %} +mode('normal') +{% else %} +mode('permissive') +{% endif %} +-- Always retry failing resolver +option('NO_THROTTLE', true) + +{% for TAF in TRUST_ANCHOR_FILES %} +trust_anchors.add_file('{{TAF}}') +{% endfor %} +trust_anchors.set_insecure({ +{% for DI in NEGATIVE_TRUST_ANCHORS %} +"{{DI}}", +{% endfor %} +}) + + +{% if FEATURES.min_ttl is defined %} +cache.min_ttl({{FEATURES.min_ttl}}) +{% endif %} + +{% if FEATURES.max_ttl is defined %} +cache.max_ttl({{FEATURES.max_ttl}}) +{% endif %} + +{% if FEATURES.dns64_prefix is defined %} +modules.load( 'dns64') +dns64.config('{{FEATURES.dns64_prefix}}') +{% endif %} + +{% if FEATURES.static_hint_name is defined %} +{% if FEATURES.static_hint_addr is defined %} +hints['{{FEATURES.static_hint_name}}'] = '{{FEATURES.static_hint_addr}}' +{% endif %} +{% endif %} + +{% if FEATURES.renumber_src is defined %} +{% if FEATURES.renumber_dst is defined %} +modules.load( 'renumber') +renumber.config({{ '{{' }}'{{FEATURES.renumber_src}}','{{FEATURES.renumber_dst}}' {{ '}}' }}) +{% endif %} +{% endif %} + +{% for policy in FEATURES.policy %} +{{policy}} +{% endfor %} + +{% if FEATURES.view is defined %} +modules.load( 'view') +{% for view in FEATURES.view %} +{{view}} +{% endfor %} +{% endif %} + +{% if FEATURES.workarounds is defined %} +modules = { 'workarounds < iterate' } +{% endif %} + +-- Disable RFC8145 signaling, scenario doesn't provide expected ansers +if ta_signal_query then + modules.unload('ta_signal_query') +end + +-- Disable RFC8109 priming, scenario doesn't provide expected ansers +if priming then + modules.unload('priming') +end + +-- Disable this module because it make one priming query. +if detect_time_skew then + modules.unload('detect_time_skew') +end + +verbose(true) + +-- Self-checks on globals +assert(help() ~= nil) +assert(worker.id ~= nil) +-- Self-checks on facilities +assert(cache.count() == 0) +assert(cache.stats() ~= nil) +assert(cache.backends() ~= nil) +assert(worker.stats() ~= nil) +assert(net.interfaces() ~= nil) +-- Self-checks on loaded stuff +assert(net.list()['{{SELF_ADDR}}']) +assert(#modules.list() > 0) +-- Self-check timers +ev = event.recurrent(1 * sec, function (ev) return 1 end) +event.cancel(ev) +ev = event.after(0, function (ev) return 1 end) |