Fix getting pool size in autoscaling e2e tests

This commit is contained in:
Aleksandra Malinowska 2018-02-21 11:21:26 +01:00
parent 852e7f7bfa
commit 0c110be0b5

View File

@ -1326,7 +1326,7 @@ func getPoolInitialSize(poolName string) int {
// get initial node count // get initial node count
args := []string{"container", "node-pools", "describe", poolName, "--quiet", args := []string{"container", "node-pools", "describe", poolName, "--quiet",
"--cluster=" + framework.TestContext.CloudConfig.Cluster, "--cluster=" + framework.TestContext.CloudConfig.Cluster,
"--format=value(initialNodeCount)"} "--format=\"value(initialNodeCount)\""}
output, err := execCmd(getGcloudCommand(args)...).CombinedOutput() output, err := execCmd(getGcloudCommand(args)...).CombinedOutput()
glog.Infof("Node-pool initial size: %s", output) glog.Infof("Node-pool initial size: %s", output)
framework.ExpectNoError(err) framework.ExpectNoError(err)
@ -1338,7 +1338,7 @@ func getPoolInitialSize(poolName string) int {
// get number of node pools // get number of node pools
args = []string{"container", "node-pools", "describe", poolName, "--quiet", args = []string{"container", "node-pools", "describe", poolName, "--quiet",
"--cluster=" + framework.TestContext.CloudConfig.Cluster, "--cluster=" + framework.TestContext.CloudConfig.Cluster,
"--format=value(instanceGroupUrls)"} "--format=\"value(instanceGroupUrls)\""}
output, err = execCmd(getGcloudCommand(args)...).CombinedOutput() output, err = execCmd(getGcloudCommand(args)...).CombinedOutput()
framework.ExpectNoError(err) framework.ExpectNoError(err)
nodeGroupCount := len(strings.Split(string(output), ";")) nodeGroupCount := len(strings.Split(string(output), ";"))