-
Notifications
You must be signed in to change notification settings - Fork 17
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
Test for changing parentRef field in policies (AuthPolicy and RateLimitPolicy) #622
base: main
Are you sure you want to change the base?
Conversation
db28248
to
4dbcc75
Compare
…itPolicy) Signed-off-by: emmaaroche <[email protected]>
4dbcc75
to
5edc14b
Compare
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Outdated
Show resolved
Hide resolved
Signed-off-by: emmaaroche <[email protected]>
b807697
to
d66e9b5
Compare
Signed-off-by: emmaaroche <[email protected]>
testsuite/tests/singlecluster/gateway/reconciliation/test_change_parentref.py
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_update_authpolicy_target_ref.py
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_update_authpolicy_target_ref.py
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_update_authpolicy_target_ref.py
Show resolved
Hide resolved
testsuite/tests/singlecluster/gateway/reconciliation/test_update_authpolicy_target_ref.py
Show resolved
Hide resolved
|
||
response = client.get("/get", auth=auth) | ||
assert response.status_code == 200 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check also that requests won't go through without the auth, and authpolicy is truly enforced. You can also verify that second gateway is not protected by authpolicy before you switch it.
responses = client.get_many("/get", 5, auth=auth) | ||
responses.assert_all(status_code=200) | ||
assert client.get("/get", auth=auth).status_code == 429 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you could check that second gateway is not limiting any requests before you switch it
testsuite/tests/singlecluster/gateway/reconciliation/test_update_ratelimitpolicy_target_ref.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of code duplicity in these tests. I'm wondering if we can create a separate package with its own conftest for this. You can put duplicate fixtures there.
In the future we will need to create the same tests for DNS and TLS policies, so they can go to the same place.
Test for changing parentRef field in policies (AuthPolicy and RateLimitPolicy)