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

E2E: honor CLEANUP_ON_EXIT, default to false #5

Merged
merged 2 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Config struct {
Location string `envconfig:"LOCATION"` // Location where you want to create the cluster
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
CleanUpOnExit bool `envconfig:"CLEANUP_ON_EXIT" default:"false"` // if true the tests will clean up rgs when tests finish
CleanUpIfFail bool `envconfig:"CLEANUP_IF_FAIL" default:"true"`
RetainSSH bool `envconfig:"RETAIN_SSH" default:"true"`
StabilityIterations int `envconfig:"STABILITY_ITERATIONS"`
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/engine/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ func Build(cfg *config.Config, masterSubnetID string, agentSubnetID string, isVM

// NodeCount returns the number of nodes that should be provisioned for a given cluster definition
func (e *Engine) NodeCount() int {
expectedCount := e.ClusterDefinition.Properties.MasterProfile.Count
for _, pool := range e.ClusterDefinition.Properties.AgentPoolProfiles {
expectedCount := e.ExpandedDefinition.Properties.MasterProfile.Count
for _, pool := range e.ExpandedDefinition.Properties.AgentPoolProfiles {
expectedCount = expectedCount + pool.Count
}
return expectedCount
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func main() {
}
}
} else {
cliProvisioner.ResourceGroups = append(rgs, cliProvisioner.Config.Name)
rgs = append(rgs, cliProvisioner.Config.Name)
engCfg, err := engine.ParseConfig(cfg.CurrentWorkingDir, cfg.ClusterDefinition, cfg.Name)
cfg.SetKubeConfig()
if err != nil {
Expand Down