Skip to content

Commit

Permalink
Skip cleaning up the instance if cleanup-resources is set to false (#…
Browse files Browse the repository at this point in the history
…8935)

Co-authored-by: Vignesh Goutham Ganesh <[email protected]>
  • Loading branch information
eks-distro-pr-bot and vignesh-goutham authored Oct 31, 2024
1 parent 96b551d commit 5c3af80
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/test/e2e/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ func RunTests(conf instanceRunConf, inventoryCatalogue map[string]*hardwareCatal
conf.Logger.Info("TestRunner instance has been created")

defer func() {
err := testRunner.decommInstance(conf)
if err != nil {
conf.Logger.V(1).Info("WARN: Failed to decomm e2e test runner instance", "error", err)
if conf.CleanupResources {
err := testRunner.decommInstance(conf)
if err != nil {
conf.Logger.V(1).Info("WARN: Failed to decomm e2e test runner instance", "error", err)
}
} else {
conf.Logger.V(1).Info("Skipping to terminate instance. cleanup-resources set to false")
}
}()

Expand Down

0 comments on commit 5c3af80

Please sign in to comment.