From 4ba082ccef80f58c6239a609cc2ed627c3e0f469 Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK <nicolas@karolak.fr> Date: Mon, 21 Jan 2019 10:54:00 +0100 Subject: [PATCH] test_dns_records.py: handle systemd-resolved --- tests/test_dns_records.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_dns_records.py b/tests/test_dns_records.py index c24ec9da..e9fbfb22 100755 --- a/tests/test_dns_records.py +++ b/tests/test_dns_records.py @@ -45,7 +45,9 @@ def check_dns(hostname, expected_ip): if status == 0: color = GREEN address = get_result(output) - if address != expected_ip: + if address == "127.0.0.1" and resolver == "127.0.0.53": + continue + elif address != expected_ip: print('Expected ip was: "%s", got "%s".' % (expected_ip, address)) color = RED all_ok = False -- GitLab