diff --git a/hack/.golint_failures b/hack/.golint_failures index 36e4a37e058..cbe5b4082a1 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -650,7 +650,6 @@ test/e2e/apps test/e2e/auth test/e2e/autoscaling test/e2e/chaosmonkey -test/e2e/cloud test/e2e/common test/e2e/framework test/e2e/framework/ingress diff --git a/test/e2e/cloud/framework.go b/test/e2e/cloud/framework.go index 6f6ae116694..16c8e7ef1f1 100644 --- a/test/e2e/cloud/framework.go +++ b/test/e2e/cloud/framework.go @@ -18,6 +18,7 @@ package cloud import "k8s.io/kubernetes/test/e2e/framework" +// SIGDescribe annotates the test with the SIG label. func SIGDescribe(text string, body func()) bool { return framework.KubeDescribe("[sig-cloud-provider] "+text, body) } diff --git a/test/e2e/cloud/nodes.go b/test/e2e/cloud/nodes.go index a3e8e0315a5..8d097082ea4 100644 --- a/test/e2e/cloud/nodes.go +++ b/test/e2e/cloud/nodes.go @@ -24,23 +24,23 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/kubernetes/test/e2e/framework" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/onsi/ginkgo" + "github.com/onsi/gomega" ) var _ = SIGDescribe("[Feature:CloudProvider][Disruptive] Nodes", func() { f := framework.NewDefaultFramework("cloudprovider") var c clientset.Interface - BeforeEach(func() { + ginkgo.BeforeEach(func() { // Only supported in AWS/GCE because those are the only cloud providers // where E2E test are currently running. framework.SkipUnlessProviderIs("aws", "gce", "gke") c = f.ClientSet }) - It("should be deleted on API server if it doesn't exist in the cloud provider", func() { - By("deleting a node on the cloud provider") + ginkgo.It("should be deleted on API server if it doesn't exist in the cloud provider", func() { + ginkgo.By("deleting a node on the cloud provider") nodeDeleteCandidates := framework.GetReadySchedulableNodesOrDie(c) nodeToDelete := nodeDeleteCandidates.Items[0] @@ -54,8 +54,8 @@ var _ = SIGDescribe("[Feature:CloudProvider][Disruptive] Nodes", func() { } newNodes, err := framework.CheckNodesReady(c, len(origNodes.Items)-1, 5*time.Minute) - Expect(err).To(BeNil()) - Expect(len(newNodes)).To(Equal(len(origNodes.Items) - 1)) + gomega.Expect(err).To(gomega.BeNil()) + gomega.Expect(len(newNodes)).To(gomega.Equal(len(origNodes.Items) - 1)) _, err = c.CoreV1().Nodes().Get(nodeToDelete.Name, metav1.GetOptions{}) if err == nil {