From 25be110fd61e07b4f63980bd6201c710652919e4 Mon Sep 17 00:00:00 2001 From: averevki Date: Tue, 8 Oct 2024 20:20:37 +0200 Subject: [PATCH] Assert default geolocation in geo loadbalancing test Signed-off-by: averevki --- .../multicluster/load_balanced/test_load_balanced_geo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/multicluster/load_balanced/test_load_balanced_geo.py b/testsuite/tests/multicluster/load_balanced/test_load_balanced_geo.py index 076e1d73..5e50bcb2 100644 --- a/testsuite/tests/multicluster/load_balanced/test_load_balanced_geo.py +++ b/testsuite/tests/multicluster/load_balanced/test_load_balanced_geo.py @@ -1,13 +1,12 @@ """Test load-balancing based on geolocation""" import pytest -import dns.name import dns.resolver pytestmark = [pytest.mark.multicluster] -def test_load_balanced_geo(client, hostname, gateway, gateway2, dns_server, dns_server2): +def test_load_balanced_geo(client, hostname, gateway, gateway2, dns_server, dns_server2, dns_default_geo_server): """ - Verify that request to the hostname is successful - Verify that DNS resolution through nameservers from different regions returns according IPs @@ -23,3 +22,6 @@ def test_load_balanced_geo(client, hostname, gateway, gateway2, dns_server, dns_ resolver.nameservers = [dns_server2["address"]] assert resolver.resolve(hostname.hostname)[0].address == gateway2.external_ip().split(":")[0] + + resolver.nameservers = [dns_default_geo_server] + assert resolver.resolve(hostname.hostname)[0].address == gateway.external_ip().split(":")[0]