diff --git a/test/e2e/framework/providers/gce/util.go b/test/e2e/framework/providers/gce/util.go index 9b31a4cbf9d..c518c703d97 100644 --- a/test/e2e/framework/providers/gce/util.go +++ b/test/e2e/framework/providers/gce/util.go @@ -52,7 +52,7 @@ func RecreateNodes(c clientset.Interface, nodes []v1.Node) error { // Find the sole managed instance group name var instanceGroup string - if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") >= 0 { + if strings.Contains(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") { return fmt.Errorf("Test does not support cluster setup with more than one managed instance group: %s", framework.TestContext.CloudConfig.NodeInstanceGroup) } instanceGroup = framework.TestContext.CloudConfig.NodeInstanceGroup