Merge #134980: nixos/test: some test fixes after #125992

This commit is contained in:
Vladimír Čunát 2021-08-20 21:29:17 +02:00
commit 571044ad8a
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 3 additions and 0 deletions

View file

@ -994,8 +994,10 @@ def _test_symbols() -> Dict[str, Any]:
subtest=subtest, subtest=subtest,
run_tests=run_tests, run_tests=run_tests,
join_all=join_all, join_all=join_all,
retry=retry,
serial_stdout_off=serial_stdout_off, serial_stdout_off=serial_stdout_off,
serial_stdout_on=serial_stdout_on, serial_stdout_on=serial_stdout_on,
Machine=Machine, # for typing
) )
return general_symbols return general_symbols

View file

@ -85,6 +85,7 @@ in import ./make-test-python.nix ({ pkgs, ...} : {
self = clientv4 if type == 4 else clientv6 self = clientv4 if type == 4 else clientv6
out = self.succeed(f"host -{type} -t {rr} {query}").rstrip() out = self.succeed(f"host -{type} -t {rr} {query}").rstrip()
self.log(f"output: {out}") self.log(f"output: {out}")
import re
assert re.search( assert re.search(
expected, out expected, out
), f"DNS IPv{type} query on {query} gave '{out}' instead of '{expected}'" ), f"DNS IPv{type} query on {query} gave '{out}' instead of '{expected}'"