Skip to content

Commit

Permalink
Assert default geolocation in geo loadbalancing test
Browse files Browse the repository at this point in the history
Signed-off-by: averevki <[email protected]>
  • Loading branch information
averevki committed Oct 8, 2024
1 parent 2fe3eda commit 25be110
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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]

0 comments on commit 25be110

Please sign in to comment.