From: Tomas Krizek Date: Tue, 15 Jan 2019 17:43:06 +0000 (+0100) Subject: pytests/kresd.conf: make sure localhost hint is present X-Git-Tag: v4.0.0~47^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d133ada00e4781b8afe8862ff1dedd246cab136f;p=thirdparty%2Fknot-resolver.git pytests/kresd.conf: make sure localhost hint is present --- diff --git a/tests/pytests/kresd.py b/tests/pytests/kresd.py index 43891ad40..607809e15 100644 --- a/tests/pytests/kresd.py +++ b/tests/pytests/kresd.py @@ -161,7 +161,7 @@ class Kresd(ContextDecorator): continue finally: sock.close() - raise RuntimeError("Kresd didn't start in time") + raise RuntimeError("Kresd didn't start in time {}".format(dest)) def socket_dest(self, family, tls=False): port = self.tls_port if tls else self.port diff --git a/tests/pytests/templates/kresd.conf.j2 b/tests/pytests/templates/kresd.conf.j2 index de52e7b0e..141f4389a 100644 --- a/tests/pytests/templates/kresd.conf.j2 +++ b/tests/pytests/templates/kresd.conf.j2 @@ -1,6 +1,6 @@ modules = { - 'policy', - 'hints > iterate', + 'hints > policy', + 'policy > iterate', } verbose({{ 'true' if kresd.verbose else 'false' }}) @@ -22,6 +22,7 @@ net.ipv6=true net.tls("{{ kresd.tls_cert_path }}", "{{ kresd.tls_key_path }}") {% endif %} +hints['localhost.'] = '127.0.0.1' {% for name, ip in kresd.hints.items() %} hints['{{ name }}'] = '{{ ip }}' {% endfor %}