Kuadrant / testsuite

3 stars 12 forks source link

Add identical hostnames test for RateLimitPolicy #462

Closed trepel closed 1 month ago

trepel commented 2 months ago

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

  1. Two RLPs being attached to GW and HTTPRoute with identical hostname respectively
  2. Two RLPs being attached to two HTTPRoutes with identical hostname each

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/679

What was done

Verification Steps

Eye review, execute both tests and make sure they pass. Also execute the two tests for AuthPolicy