mirror of https://github.com/k3s-io/k3s
fix golint failures for test/e2e/cloud
parent
0d98463f9c
commit
84aeafee7b
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue