Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unsynced objects in multicluster tests #621

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ def test_change_default_geo(hostname, gateway, gateway2, dns_policy, dns_policy2

assert resolver.resolve(hostname.hostname)[0].address == gateway.external_ip().split(":")[0]

dns_policy.model.spec.loadBalancing.defaultGeo = False
dns_policy.apply()
dns_policy.refresh().model.spec.loadBalancing.defaultGeo = False
res = dns_policy.apply()
assert res.status() == 0, res.err()
dns_policy.wait_for_ready()

dns_policy2.model.spec.loadBalancing.defaultGeo = True
dns_policy2.apply()
dns_policy2.refresh().model.spec.loadBalancing.defaultGeo = True
res2 = dns_policy2.apply()
assert res2.status() == 0, res2.err()
dns_policy2.wait_for_ready()

sleep(300) # wait for DNS propagation on providers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def test_change_lb_strategy(hostname, gateway, gateway2, dns_policy2, dns_server
resolver.nameservers = [dns_server2["address"]]
assert resolver.resolve(hostname.hostname)[0].address == gateway2.external_ip().split(":")[0]

dns_policy2.model.spec.pop("loadBalancing")
dns_policy2.apply()
dns_policy2.refresh().model.spec.pop("loadBalancing")
res = dns_policy2.apply()
assert res.status() == 0, res.err()
assert dns_policy2.wait_until(
has_record_condition(
"Ready",
Expand All @@ -29,7 +30,7 @@ def test_change_lb_strategy(hostname, gateway, gateway2, dns_policy2, dns_server
"The DNS provider failed to ensure the record: record type conflict, cannot update endpoint "
f"'{wildcard_domain}' with record type 'A' when endpoint already exists with record type 'CNAME'",
)
)
), f"DNSPolicy did not reach expected record status, instead it was: {dns_policy2.model.status.recordConditions}"

sleep(300) # wait for DNS propagation on providers
assert resolver.resolve(hostname.hostname)[0].address == gateway.external_ip().split(":")[0]
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

def test_unsupported_geocode(dns_policy2):
"""Change default geocode to not existent one and verify that policy became not enforced"""
dns_policy2.model.spec.loadBalancing.geo = "XX"
dns_policy2.apply()
dns_policy2.refresh().model.spec.loadBalancing.geo = "XX"
res = dns_policy2.apply()
assert res.status() == 0, res.err()

assert dns_policy2.wait_until(has_condition("Enforced", "False"))
assert dns_policy2.wait_until(
Expand Down
Loading