Repository navigation
chore(e2e): Use DeferCleanup for the remaining cleanup in parallel tests - #1634
Gabrielandre02 wants to merge 1 commit into
Conversation
Signed-off-by: gabriel.carmo <admin@gabrielandre.com.br>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Hi @Gabrielandre02. Thanks for your PR. I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
@Gabrielandre02: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What does this PR do?
Refs #1464
This covers the parallel specs that #1531 to #1538 left out because their cleanup needed case-by-case handling. In 12 files, cleanup that was done with
deferin the spec body, or kept in a spec variable and called fromAfterEach, is now registered withDeferCleanupright after the resource is created.deferin the spec body becomesDeferCleanup.cleanupfuncsslice go away with theif x != nilchecks inAfterEach. 1-083 used to call its cleanup twice (deferandAfterEach), now it runs once.DeleteNamespacemoves from adeferinAfterEachto aDeferCleanupafter the namespace is created.ensureTestPriorityClassregisters the PriorityClass deletion itself, socreatedPriorityClassNamesgoes away. The PriorityClasses are created before the namespace, so they are still deleted after it.DeferCleanupruns afterAfterEach, soOutputDebugOnFailstill runs before the namespaces are deleted. In 1-121 it used to run after the namespace was deleted, so the debug output now includes the namespace contents.defer cancel()(port-forward and context),defer resp.Body.Close()anddefer conn.Close()stay as they are: they release local resources, not cluster state.PR acceptance criteria:
make serve-docs: not applicable, no docs change.What type of PR is this?
/kind cleanup
Special notes to the reviewer:
go vet ./test/openshift/e2e/ginkgo/parallel/is clean and the package compiles. I did not run the E2E specs locally (no cluster). 1-141 is labelledopenshift, so it only runs in the Prow jobs.The sequential specs will come in separate PRs.