Skip to content

Commit

Permalink
pass "recurse" to sdig if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Nov 17, 2023
1 parent bd3a046 commit 9f5de55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion regression-tests.api/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ def finalize_server():
sys.exit(2)

print("Query for example.com/A to create statistic data...")
run_check_call([sdig, "127.0.0.1", str(DNSPORT), "example.com", "A"])
if daemon == 'authoritative':
run_check_call([sdig, "127.0.0.1", str(DNSPORT), "example.com", "A"])
else:
run_check_call([sdig, "127.0.0.1", str(DNSPORT), "example.com", "A", "recurse"])

print("Running tests...")
returncode = 0
Expand Down
5 changes: 4 additions & 1 deletion regression-tests.api/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def pdnsutil_rectify(zonename):
pdnsutil('rectify-zone', zonename)

def sdig(*args):
sdig_command_line = [SDIG, '127.0.0.1', str(DNSPORT)] + list(args)
if DAEMON == 'authoritative':
sdig_command_line = [SDIG, '127.0.0.1', str(DNSPORT)] + list(args)
else:
sdig_command_line = [SDIG, '127.0.0.1', str(DNSPORT)] + list(args) + ["recurse"]
try:
return subprocess.check_output(sdig_command_line).decode('utf-8')
except subprocess.CalledProcessError as except_inst:
Expand Down

0 comments on commit 9f5de55

Please sign in to comment.