Fix error handling in cluster autoscaler e2e test

This commit is contained in:
Marcin Wielgus 2016-12-05 00:35:15 +01:00
parent 737edd02a4
commit f710480e91

View File

@ -216,7 +216,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
glog.Infof("Kubectl:%s\n", framework.RunKubectlOrDie("get", "nodes", "-o", "json")) glog.Infof("Kubectl:%s\n", framework.RunKubectlOrDie("get", "nodes", "-o", "json"))
if output, err := exec.Command("gcloud", "compute", "instances", "list", if output, err := exec.Command("gcloud", "compute", "instances", "list",
"--project="+framework.TestContext.CloudConfig.ProjectID, "--project="+framework.TestContext.CloudConfig.ProjectID,
"--zone="+framework.TestContext.CloudConfig.Zone).Output(); err != nil { "--zone="+framework.TestContext.CloudConfig.Zone).Output(); err == nil {
glog.Infof("Gcloud compute instances list: %s", output) glog.Infof("Gcloud compute instances list: %s", output)
} else { } else {
glog.Errorf("Failed to get instances list: %v", err) glog.Errorf("Failed to get instances list: %v", err)
@ -226,7 +226,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
if output, err := exec.Command("gcloud", "compute", "instances", "describe", if output, err := exec.Command("gcloud", "compute", "instances", "describe",
newNode, newNode,
"--project="+framework.TestContext.CloudConfig.ProjectID, "--project="+framework.TestContext.CloudConfig.ProjectID,
"--zone="+framework.TestContext.CloudConfig.Zone).Output(); err != nil { "--zone="+framework.TestContext.CloudConfig.Zone).Output(); err == nil {
glog.Infof("Gcloud compute instances describe: %s", output) glog.Infof("Gcloud compute instances describe: %s", output)
} else { } else {
glog.Errorf("Failed to get instances describe: %v", err) glog.Errorf("Failed to get instances describe: %v", err)