Add identical hostnames tests for desired behavior #477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Last piece to address #406
Follows up on #439 and #462 which added similar tests for AuthPolicy and RateLimitPolicy (RLP) respectively, but these tests validating current behavior.
The tests in this PR cover two scenarios, both testing desired behavior. Desired behavior means that Kuadrant does not behave like that yet so the tests are expected to fail. Once they start passing it means that implementation has changed and it would be good to take a closer look how and if that makes sense and update the testsuite accordingly.
Scenario 1.
Test that 2nd Gateway-attached AuthPolicy is actually enforced on route (currently it states that it is enforced but effectively it is ignored)
Scenario 2.
Test that 2nd HTTPRoute-attached AuthPolicy is enforced (currently it fails with an error, status being Enforced=False)
Scenario 3.
Test that the 1st HTTPRoute-attached RLP is effectively enforced (currently it is effectively ignored because the 2nd HTTPRoute-attached RLP "kicks" it off)
Verification Steps
Run the three tests. Or even better run the whole dir with all the "identical hostname" tests. 4 tests should pass, 3 should be xfailed. It should take roughly 8-9 minutes: