Skip to content

Commit

Permalink
Merge pull request #1641 from NeerajNagure/skip-cleanup
Browse files Browse the repository at this point in the history
🌱 check for skipCleanup before running cleanup of test resources
  • Loading branch information
metal3-io-bot authored Apr 3, 2024
2 parents dcb543b + 76f61a6 commit fe431f3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion test/e2e/basic_ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ var _ = Describe("basic", Label("required", "basic"), func() {
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})
4 changes: 3 additions & 1 deletion test/e2e/external_inspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ var _ = Describe("External Inspection", Label("required", "external-inspection")
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})
4 changes: 3 additions & 1 deletion test/e2e/inspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ var _ = Describe("Inspection", Label("required", "inspection"), func() {
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})
4 changes: 3 additions & 1 deletion test/e2e/live_iso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ var _ = Describe("Live-ISO", Label("required", "live-iso"), func() {
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})
4 changes: 3 additions & 1 deletion test/e2e/provisioning_and_annotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ var _ = Describe("Provision, detach, recreate from status and deprovision", Labe
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})
4 changes: 3 additions & 1 deletion test/e2e/re_inspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ var _ = Describe("Re-Inspection", Label("required", "re-inspection"), func() {
})

AfterEach(func() {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
if !skipCleanup {
cleanup(ctx, clusterProxy, namespace, cancelWatches, e2eConfig.GetIntervals("default", "wait-namespace-deleted")...)
}
})
})

0 comments on commit fe431f3

Please sign in to comment.