From 702442b43d056e2b16a73e590c8046d26e585412 Mon Sep 17 00:00:00 2001 From: averevki Date: Wed, 24 Jul 2024 11:02:41 +0200 Subject: [PATCH] Fix multicluster dns test Signed-off-by: averevki --- testsuite/tests/multicluster/test_multicluster_dns.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/testsuite/tests/multicluster/test_multicluster_dns.py b/testsuite/tests/multicluster/test_multicluster_dns.py index af34fa86..ac59b685 100644 --- a/testsuite/tests/multicluster/test_multicluster_dns.py +++ b/testsuite/tests/multicluster/test_multicluster_dns.py @@ -25,9 +25,5 @@ def test_multicluster_dns(client, hostname, gateways): assert result.status_code == 200 ips = {gateway.external_ip().split(":")[0] for gateway in gateways.values()} - dns_ips = set(()) - for _ in range(len(ips)): - answer = dns.resolver.resolve(hostname.hostname)[0] - assert answer.address in ips, f"Got {answer.address} that is not expected in {ips}" - dns_ips.add(answer.address) + dns_ips = {ip.address for ip in dns.resolver.resolve(hostname.hostname)} assert ips == dns_ips, f"Expected IPs and actual IP mismatch, got {dns_ips}, expected {ips}"