test: move Redis e2e fixture into utils - #1551
Conversation
Signed-off-by: aeron-gh <agab0323@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Checked the move line by line against Two things are worth settling before the KVCache suite consumes it, because both are assumptions that were safe while the path was hardcoded and stop being safe once The readiness wait polls the passed namespace, not the one the Deployment was created in. Inside the loop, Only the first Deployment is waited on. Neither blocks this PR as a refactor. Raising them here because #1328 and #1222 are the stated consumers, and both are cheaper to fix in the fixture than to debug from a timeout inside a new suite. |
Signed-off-by: aeron-gh <agab0323@gmail.com>
good catches, both verified, and both are exactly the assumptions that stop holding once the path is a parameter. pushed a commit: the deployment ref is captured after the namespace resolves and before create (so a preexisting deployment still gets waited on, same as today), and the wait now loops over every deployment in the manifest, each polled in the namespace it landed in. redis-standalone behaves the same, one deployment, nothing pinned. |
|
Checked the commit. Both are closed correctly, and capturing the ref before One consequence worth naming for the consumers: the wait is now sequential with its own two-minute budget per Deployment, so a fixture with two of them can spend four minutes here before anything is asserted. The router suite currently uses 9m 12s of the 18m target on my machine, so there is room, but it is worth knowing before a KVCache fixture brings up Redis alongside a second component. |
right, worst case additive, though every create happens before the first wait starts, so the second deployment is already rolling while the first is polled and it rarely costs the full budget. if a fixture ever carries two, the waits can go concurrent then. good number to have on record. |
/kind cleanup
What this PR does / why we need it:
Moves the Redis provisioning fixture out of the rate-limit test in
test/e2e/router/shared.gointotest/e2e/utils, with the manifest path as a parameter.ensureRedisstays as a thin wrapper, so the global rate-limit test behaves exactly as before.Motivation: the KVCache-aware e2e work discussed in #1328 and drafted in #1222 needs Redis provisioning too; this makes the existing fixture reusable instead of tied to one test. Split out first since it is mechanical and reviewable on its own.
Special notes for your reviewer:
Verbatim move, no behavior change.
go buildandgo vetpass on./test/e2e/....Does this PR introduce a user-facing change?: