Skip to content

Commit 167cfc9

Browse files
committed
On failure, don't cleanup only if flag is set
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
1 parent 026fcb6 commit 167cfc9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/e2e/setup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func testWrapper(test func()) func() {
268268

269269
ginkgo.AfterAll(func() {
270270
// Only cleanup if the test succeeded
271-
if !ginkgo.CurrentSpecReport().Failed() {
271+
if !(ginkgo.CurrentSpecReport().Failed() && keepClusterOnFailure) {
272272
testutils.DeleteObjects(testConfig, rbacObjects, nsName)
273273
testutils.DeleteObjects(testConfig, serviceObjects, nsName)
274274
testutils.DeleteObjects(testConfig, serviceAccountObjects, nsName)

0 commit comments

Comments
 (0)