From 089fe3508914e49eb5f510b3ff69172910771557 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Wed, 14 Nov 2018 22:01:40 -0800 Subject: [PATCH 1/2] honor CLEANUP_ON_EXIT, default to false --- test/e2e/config/config.go | 2 +- test/e2e/runner.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/config/config.go b/test/e2e/config/config.go index 013dda8f21..4debaf9c5b 100644 --- a/test/e2e/config/config.go +++ b/test/e2e/config/config.go @@ -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"` diff --git a/test/e2e/runner.go b/test/e2e/runner.go index 2d1543df84..8dcc8ac320 100644 --- a/test/e2e/runner.go +++ b/test/e2e/runner.go @@ -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 { From cdccdd909a800f13241c1d51131e83ec136cff10 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 15 Nov 2018 10:04:23 -0800 Subject: [PATCH 2/2] node count check now uses expanded api model this deals better w/ scale --- test/e2e/engine/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/engine/template.go b/test/e2e/engine/template.go index fec56c47d2..3a1355b809 100644 --- a/test/e2e/engine/template.go +++ b/test/e2e/engine/template.go @@ -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