Skip to content

Commit 493b261

Browse files
authored
Merge pull request kubernetes#74586 from danielqsj/patch3
fix golint failures for test/e2e/cloud|kubectl|servicecatalog
2 parents 26f90e8 + 8911a2d commit 493b261

File tree

8 files changed

+385
-385
lines changed

8 files changed

+385
-385
lines changed

hack/.golint_failures

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,22 +650,19 @@ test/e2e/apps
650650
test/e2e/auth
651651
test/e2e/autoscaling
652652
test/e2e/chaosmonkey
653-
test/e2e/cloud
654653
test/e2e/common
655654
test/e2e/framework
656655
test/e2e/framework/providers/gce
657656
test/e2e/framework/providers/kubemark
658657
test/e2e/instrumentation
659658
test/e2e/instrumentation/logging
660659
test/e2e/instrumentation/monitoring
661-
test/e2e/kubectl
662660
test/e2e/lifecycle
663661
test/e2e/lifecycle/bootstrap
664662
test/e2e/network
665663
test/e2e/node
666664
test/e2e/scalability
667665
test/e2e/scheduling
668-
test/e2e/servicecatalog
669666
test/e2e/storage
670667
test/e2e/storage/drivers
671668
test/e2e/storage/testsuites

test/e2e/cloud/framework.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package cloud
1818

1919
import "k8s.io/kubernetes/test/e2e/framework"
2020

21+
// SIGDescribe annotates the test with the SIG label.
2122
func SIGDescribe(text string, body func()) bool {
2223
return framework.KubeDescribe("[sig-cloud-provider] "+text, body)
2324
}

test/e2e/cloud/nodes.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ import (
2424
clientset "k8s.io/client-go/kubernetes"
2525
"k8s.io/kubernetes/test/e2e/framework"
2626

27-
. "github.com/onsi/ginkgo"
28-
. "github.com/onsi/gomega"
27+
"github.com/onsi/ginkgo"
28+
"github.com/onsi/gomega"
2929
)
3030

3131
var _ = SIGDescribe("[Feature:CloudProvider][Disruptive] Nodes", func() {
3232
f := framework.NewDefaultFramework("cloudprovider")
3333
var c clientset.Interface
3434

35-
BeforeEach(func() {
35+
ginkgo.BeforeEach(func() {
3636
// Only supported in AWS/GCE because those are the only cloud providers
3737
// where E2E test are currently running.
3838
framework.SkipUnlessProviderIs("aws", "gce", "gke")
3939
c = f.ClientSet
4040
})
4141

42-
It("should be deleted on API server if it doesn't exist in the cloud provider", func() {
43-
By("deleting a node on the cloud provider")
42+
ginkgo.It("should be deleted on API server if it doesn't exist in the cloud provider", func() {
43+
ginkgo.By("deleting a node on the cloud provider")
4444

4545
nodeDeleteCandidates := framework.GetReadySchedulableNodesOrDie(c)
4646
nodeToDelete := nodeDeleteCandidates.Items[0]
@@ -54,8 +54,8 @@ var _ = SIGDescribe("[Feature:CloudProvider][Disruptive] Nodes", func() {
5454
}
5555

5656
newNodes, err := framework.CheckNodesReady(c, len(origNodes.Items)-1, 5*time.Minute)
57-
Expect(err).To(BeNil())
58-
Expect(len(newNodes)).To(Equal(len(origNodes.Items) - 1))
57+
gomega.Expect(err).To(gomega.BeNil())
58+
gomega.Expect(len(newNodes)).To(gomega.Equal(len(origNodes.Items) - 1))
5959

6060
_, err = c.CoreV1().Nodes().Get(nodeToDelete.Name, metav1.GetOptions{})
6161
if err == nil {

test/e2e/kubectl/framework.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package kubectl
1818

1919
import "github.com/onsi/ginkgo"
2020

21+
// SIGDescribe annotates the test with the SIG label.
2122
func SIGDescribe(text string, body func()) bool {
2223
return ginkgo.Describe("[sig-cli] "+text, body)
2324
}

0 commit comments

Comments
 (0)