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 https://github.com/Kuadrant/kuadrant-operator/pull/679
What was done
added two tests - one for each scenario
updated wait_for_ready so that it only returns True only if policy is fully enforced (not only partially)
added wait_for_partial_enforced method
using /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. scenario
renamed 2nd route to route2
Verification Steps
Eye review, execute both tests and make sure they pass. Also execute the two tests for AuthPolicy
Overview
Partially addresses https://github.com/Kuadrant/testsuite/issues/406 Follows up for https://github.com/Kuadrant/testsuite/pull/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 https://github.com/Kuadrant/kuadrant-operator/pull/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