From c4787225ee62cc049a35d41457a1de2441d2aa88 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Thu, 16 Jun 2016 14:01:24 +0200 Subject: [PATCH] Log node-pool deletion in cluster autoscaler tests --- test/e2e/cluster_size_autoscaling.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index d9bdcbe74c..ea0320aa45 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -206,10 +206,17 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { "--project="+framework.TestContext.CloudConfig.ProjectID, "--zone="+framework.TestContext.CloudConfig.Zone, "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() - defer exec.Command("gcloud", "alpha", "container", "node-pools", "delete", extraPoolName, "--quiet", - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone, - "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + defer func() { + glog.Infof("Deleting node pool %s", extraPoolName) + output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "delete", extraPoolName, "--quiet", + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone, + "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + if err != nil { + glog.Infof("Error: %v", err) + } + glog.Infof("Node-pool deletion output: %s", output) + }() framework.ExpectNoError(err) glog.Infof("Creating node-pool: %s", output) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout))