Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix golint failures for test/e2e/cloud|kubectl|servicecatalog #74586

Merged
merged 3 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -659,14 +658,12 @@ test/e2e/framework/providers/kubemark
test/e2e/instrumentation
test/e2e/instrumentation/logging
test/e2e/instrumentation/monitoring
test/e2e/kubectl
test/e2e/lifecycle
test/e2e/lifecycle/bootstrap
test/e2e/network
test/e2e/node
test/e2e/scalability
test/e2e/scheduling
test/e2e/servicecatalog
test/e2e/storage
test/e2e/storage/drivers
test/e2e/storage/testsuites
Expand Down
1 change: 1 addition & 0 deletions test/e2e/cloud/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
14 changes: 7 additions & 7 deletions test/e2e/cloud/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/kubectl/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package kubectl

import "github.com/onsi/ginkgo"

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