You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setup and cleanup is collocated. Now the cleanup is in AfterEach but the setup is in either BeforeEach or in It. This adds slight cognitive complexity to each suite.
There is no need to save all state needed for cleanup only - typically "cleanup" functions. This reduces the number of spec variables needed. Also simplify AfterEach code, especially in case of multiple resources acquired one-after-another.
I opened #1634 and #1635 for the parallel specs and the simpler sequential ones. The remaining specs restore the Subscription, remove finalizers or touch the default instance in AfterEach, where the cleanup order matters. Is it worth migrating those too, or would you rather leave them as they are?
Activity
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in sequential test…
chore(e2e): Use DeferCleanup for namespace cleanup in sequential test…
chore(e2e): Use DeferCleanup instead of AfterEach cleanup in parallel…
chore(e2e): Use DeferCleanup instead of AfterEach cleanup in sequenti…
chore(e2e): Use DeferCleanup for namespace cleanup in sequential test…
chore(e2e): Use DeferCleanup instead of AfterEach cleanup in parallel…
chore(e2e): Use DeferCleanup instead of AfterEach cleanup in sequenti…
chore(e2e): Use DeferCleanup for namespace cleanup in sequential test…
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in parallel tests …
chore(e2e): Use DeferCleanup for namespace cleanup in sequential test…
Gabrielandre02 commentedon Dec 4, 2026
/assign
Gabrielandre02 commentedon Dec 4, 2026
I opened #1634 and #1635 for the parallel specs and the simpler sequential ones. The remaining specs restore the Subscription, remove finalizers or touch the default instance in
AfterEach, where the cleanup order matters. Is it worth migrating those too, or would you rather leave them as they are?