Skip to content

Commit d49ce6a

Browse files
authored
Merge pull request kubernetes#85751 from tanjunchen/fix-staticcheck-test-e2e-auth-cloud
fix staticcheck in test/e2e/cloud/
2 parents 220e2ce + c687521 commit d49ce6a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/e2e/cloud/gcp/node_lease.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var _ = SIGDescribe("[Disruptive]NodeLease", func() {
4545
systemPods, err := e2epod.GetPodsInNamespace(c, ns, map[string]string{})
4646
framework.ExpectNoError(err)
4747
systemPodsNo = int32(len(systemPods))
48-
if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") >= 0 {
48+
if strings.Contains(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
4949
framework.Failf("Test dose not support cluster setup with more than one MIG: %s", framework.TestContext.CloudConfig.NodeInstanceGroup)
5050
} else {
5151
group = framework.TestContext.CloudConfig.NodeInstanceGroup

test/e2e/cloud/gcp/resize_nodes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var _ = SIGDescribe("Nodes [Disruptive]", func() {
5454
systemPods, err := e2epod.GetPodsInNamespace(c, ns, map[string]string{})
5555
framework.ExpectNoError(err)
5656
systemPodsNo = int32(len(systemPods))
57-
if strings.Index(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") >= 0 {
57+
if strings.Contains(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
5858
framework.Failf("Test dose not support cluster setup with more than one MIG: %s", framework.TestContext.CloudConfig.NodeInstanceGroup)
5959
} else {
6060
group = framework.TestContext.CloudConfig.NodeInstanceGroup

0 commit comments

Comments
 (0)