Commit a5edd78f authored by Petr Špaček's avatar Petr Špaček

Deckard: fail test if some answers are not defined

This follows the same behavior as testbound.
parent 971fa855
Pipeline #2607 passed with stage
in 6 minutes and 41 seconds
......@@ -286,6 +286,8 @@ def play_object(path, args):
% daemon_proc.returncode)
# Do not clear files if the server crashed (for analysis)
del_files(TMPDIR, OWN_TMPDIR)
if server.undefined_answers > 0:
raise ValueError('the scenario does not define all necessary answers (see error log)')
def test_platform(*args):
......
......@@ -198,6 +198,7 @@ class TestServer:
response = dns.message.make_response(query)
response.set_rcode(dns.rcode.SERVFAIL)
data_to_wire = response.to_wire()
self.undefined_answers += 1
self.scenario.current_step.log.error(
'server %s has no response for question %s, answering with SERVFAIL',
server_addr,
......@@ -208,6 +209,7 @@ class TestServer:
def query_io(self):
""" Main server process """
self.undefined_answers = 0
if self.active is False:
raise Exception("[query_io] Test server not active")
while self.active is True:
......
Markdown is supported
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