Skip to content
Snippets Groups Projects
Commit b3f6d051 authored by Karel Slaný's avatar Karel Slaný
Browse files

tests: trust anchors from rpl files are used for server configuration

parent 6d100fb1
Branches
Tags
No related merge requests found
......@@ -4,6 +4,7 @@ modules = {'stats', 'policy', 'hints'}
hints.root({['k.root-servers.net'] = '{{ROOT_ADDR}}'})
option('NO_MINIMIZE', {{NO_MINIMIZE}})
option('ALLOW_LOCAL', true)
validate.trust_anchor_add('{{TRUST_ANCHOR}}')
-- Self-checks on globals
assert(help() ~= nil)
......
......@@ -181,11 +181,16 @@ def setup_env(child_env, config, config_name, j2template):
child_env["SOCKET_WRAPPER_DEFAULT_IFACE"] = "%i" % CHILD_IFACE
child_env["SOCKET_WRAPPER_DIR"] = TMPDIR
no_minimize = "true"
trust_anchor_str = ""
for k,v in config:
# Enable selectively for some tests
if k == 'query-minimization' and str2bool(v):
no_minimize = "false"
break
elif k == 'trust-anchor':
if ((v[0] == '"') and (v[-1] == '"')) or ((v[0] == '\'') and (v[-1] == '\'')):
trust_anchor = v[1:-1]
else:
trust_anchor = v
selfaddr = testserver.get_local_addr_str(socket.AF_INET, DEFAULT_IFACE)
childaddr = testserver.get_local_addr_str(socket.AF_INET, CHILD_IFACE)
# Prebind to sockets to create necessary files
......@@ -201,6 +206,7 @@ def setup_env(child_env, config, config_name, j2template):
"ROOT_ADDR" : selfaddr,
"SELF_ADDR" : childaddr,
"NO_MINIMIZE" : no_minimize,
"TRUST_ANCHOR" : trust_anchor,
"WORKING_DIR" : TMPDIR,
}
cfg_rendered = j2template.render(j2template_ctx)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment