fix staticcheck in test/e2e/cloud/

This commit is contained in:
tanjunchen 2019-12-02 11:29:49 +08:00
parent cf16e4988f
commit c687521b44
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ var _ = SIGDescribe("[Disruptive]NodeLease", func() {
systemPods, err := e2epod.GetPodsInNamespace(c, ns, map[string]string{})
framework.ExpectEqual(err, nil)
systemPodsNo = int32(len(systemPods))
if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") >= 0 {
if strings.Contains(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
framework.Failf("Test dose not support cluster setup with more than one MIG: %s", framework.TestContext.CloudConfig.NodeInstanceGroup)
} else {
group = framework.TestContext.CloudConfig.NodeInstanceGroup

View File

@ -54,7 +54,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
systemPods, err := e2epod.GetPodsInNamespace(c, ns, map[string]string{})
framework.ExpectNoError(err)
systemPodsNo = int32(len(systemPods))
if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") >= 0 {
if strings.Contains(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
framework.Failf("Test dose not support cluster setup with more than one MIG: %s", framework.TestContext.CloudConfig.NodeInstanceGroup)
} else {
group = framework.TestContext.CloudConfig.NodeInstanceGroup