forked from Kuadrant/testsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
testsuite/tests/kuadrant/gateway/reconciliation/test_affected_by.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""Tests that affected by status is applied correctly to the HTTPRoute and Gateway""" | ||
|
||
import pytest | ||
|
||
pytestmark = [pytest.mark.kuadrant_only] | ||
|
||
|
||
def test_route_status(route, rate_limit, authorization): | ||
"""Tests affected by status for HTTPRoute""" | ||
route.refresh() | ||
assert route.is_affected_by(rate_limit) | ||
assert route.is_affected_by(authorization) | ||
|
||
rate_limit.delete() | ||
assert not route.wait_until(lambda obj: obj.is_affected_by(rate_limit)) | ||
|
||
authorization.delete() | ||
assert not route.wait_until(lambda obj: obj.is_affected_by(authorization)) | ||
|
||
|
||
def test_gateway_status(gateway, dns_policy, tls_policy): | ||
"""Tests affected by status for Gateway""" | ||
gateway.refresh() | ||
assert gateway.is_affected_by(dns_policy) | ||
assert gateway.is_affected_by(tls_policy) | ||
|
||
dns_policy.delete() | ||
assert not gateway.wait_until(lambda obj: obj.is_affected_by(dns_policy)) | ||
|
||
tls_policy.delete() | ||
assert not gateway.wait_until(lambda obj: obj.is_affected_by(tls_policy)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters