Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
don’t delete cluster if failed deployment (#2817)
Browse files Browse the repository at this point in the history
* don’t delete cluster if failed deployment

* CLEANUP_IF_FAIL
  • Loading branch information
jackfrancis authored May 1, 2018
1 parent 27de7f1 commit 8123237
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/e2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Config struct {
Regions []string `envconfig:"REGIONS"` // A whitelist of availableregions
ClusterDefinition string `envconfig:"CLUSTER_DEFINITION" required:"true" default:"examples/kubernetes.json"` // ClusterDefinition is the path on disk to the json template these are normally located in examples/
CleanUpOnExit bool `envconfig:"CLEANUP_ON_EXIT" default:"true"` // if set the tests will not clean up rgs when tests finish
CleanUpIfFail bool `envconfig:"CLEANUP_IF_FAIL" default:"true"`
RetainSSH bool `envconfig:"RETAIN_SSH" default:"true"`
Timeout time.Duration `envconfig:"TIMEOUT" default:"10m"`
CurrentWorkingDir string
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ func main() {
rgs = cliProvisioner.ResourceGroups
eng = cliProvisioner.Engine
if err != nil {
teardown()
if cfg.CleanUpIfFail {
teardown()
}
log.Fatalf("Error while trying to provision cluster:%s", err)
}
if cfg.SoakClusterName != "" {
Expand Down

0 comments on commit 8123237

Please sign in to comment.