Add identical hostnames test for RateLimitPolicy #462
Merged
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
Partially addresses #406
Follows up for #439 which added similar tests for AuthPolicy, this PR does the same for RateLimitPolicy (RLP).
It covers two scenarios, both testing current behavior
For details see https://github.com/Kuadrant/kuadrant-operator/blob/main/doc/rate-limiting.md#limitation-multiple-network-resources-with-identical-hostnames
Note that the 1. scenario has been fixed in the meantime, doc is not up-to-date. The GW RLP is now partially enforced meaning that it is actually applied on the route-b. Partially enforced policy has
Enforced=True
status as well, see Kuadrant/kuadrant-operator#679What was done
wait_for_ready
so that it only returnsTrue
only if policy is fully enforced (not only partially)wait_for_partial_enforced
method/anything/route1
and/anything/route2
paths instead of just/
and/anything
which better aligns with doc (/foo
and/bar
). Using just/
is problematic because if is "superset" to/anything/
so it was not ideal for 2. scenarioroute2
Verification Steps
Eye review, execute both tests and make sure they pass. Also execute the two tests for AuthPolicy