Skip to content

Commit d0f582c

Browse files
authored
Merge pull request kubernetes#87069 from tanjunchen/migrate-to-skipper-001
e2e/node/:Use e2eskipper package
2 parents 62f6a42 + 8c48102 commit d0f582c

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

test/e2e/node/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ go_library(
4747
"//test/e2e/framework/pod:go_default_library",
4848
"//test/e2e/framework/rc:go_default_library",
4949
"//test/e2e/framework/security:go_default_library",
50+
"//test/e2e/framework/skipper:go_default_library",
5051
"//test/e2e/framework/ssh:go_default_library",
5152
"//test/e2e/framework/volume:go_default_library",
5253
"//test/e2e/perftype:go_default_library",

test/e2e/node/apparmor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"k8s.io/kubernetes/test/e2e/framework"
2121
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
2222
e2esecurity "k8s.io/kubernetes/test/e2e/framework/security"
23+
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
2324

2425
"github.com/onsi/ginkgo"
2526
)
@@ -29,7 +30,7 @@ var _ = SIGDescribe("AppArmor", func() {
2930

3031
ginkgo.Context("load AppArmor profiles", func() {
3132
ginkgo.BeforeEach(func() {
32-
framework.SkipIfAppArmorNotSupported()
33+
e2eskipper.SkipIfAppArmorNotSupported()
3334
e2esecurity.LoadAppArmorProfiles(f.Namespace.Name, f.ClientSet)
3435
})
3536
ginkgo.AfterEach(func() {

test/e2e/node/crictl.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"strings"
2222

2323
"k8s.io/kubernetes/test/e2e/framework"
24+
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
2425
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
2526

2627
"github.com/onsi/ginkgo"
@@ -31,9 +32,9 @@ var _ = SIGDescribe("crictl", func() {
3132

3233
ginkgo.BeforeEach(func() {
3334
// `crictl` is not available on all cloud providers.
34-
framework.SkipUnlessProviderIs("gce", "gke")
35+
e2eskipper.SkipUnlessProviderIs("gce", "gke")
3536
// The test requires $HOME/.ssh/id_rsa key to be present.
36-
framework.SkipUnlessSSHKeyPresent()
37+
e2eskipper.SkipUnlessSSHKeyPresent()
3738
})
3839

3940
ginkgo.It("should be able to run crictl on the node", func() {

test/e2e/node/kubelet.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
3434
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3535
e2erc "k8s.io/kubernetes/test/e2e/framework/rc"
36+
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
3637
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
3738
"k8s.io/kubernetes/test/e2e/framework/volume"
3839
testutils "k8s.io/kubernetes/test/utils"
@@ -415,7 +416,7 @@ var _ = SIGDescribe("kubelet", func() {
415416
}
416417

417418
ginkgo.BeforeEach(func() {
418-
framework.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
419+
e2eskipper.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
419420
_, nfsServerPod, nfsIP = volume.NewNFSServer(c, ns, []string{"-G", "777", "/exports"})
420421
})
421422

test/e2e/node/node_problem_detector.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"k8s.io/kubernetes/test/e2e/framework"
3131
e2ekubelet "k8s.io/kubernetes/test/e2e/framework/kubelet"
3232
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
33+
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
3334
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
3435
testutils "k8s.io/kubernetes/test/utils"
3536

@@ -47,15 +48,15 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
4748
f := framework.NewDefaultFramework("node-problem-detector")
4849

4950
ginkgo.BeforeEach(func() {
50-
framework.SkipUnlessSSHKeyPresent()
51-
framework.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
52-
framework.SkipUnlessProviderIs("gce", "gke")
53-
framework.SkipUnlessNodeOSDistroIs("gci", "ubuntu")
51+
e2eskipper.SkipUnlessSSHKeyPresent()
52+
e2eskipper.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
53+
e2eskipper.SkipUnlessProviderIs("gce", "gke")
54+
e2eskipper.SkipUnlessNodeOSDistroIs("gci", "ubuntu")
5455
e2enode.WaitForTotalHealthy(f.ClientSet, time.Minute)
5556
})
5657

5758
ginkgo.It("should run without error", func() {
58-
framework.SkipUnlessSSHKeyPresent()
59+
e2eskipper.SkipUnlessSSHKeyPresent()
5960

6061
ginkgo.By("Getting all nodes and their SSH-able IP addresses")
6162
nodes, err := e2enode.GetReadySchedulableNodes(f.ClientSet)

test/e2e/node/ssh.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"strings"
2222

2323
"k8s.io/kubernetes/test/e2e/framework"
24+
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
2425
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
2526

2627
"github.com/onsi/ginkgo"
@@ -34,11 +35,11 @@ var _ = SIGDescribe("SSH", func() {
3435

3536
ginkgo.BeforeEach(func() {
3637
// When adding more providers here, also implement their functionality in e2essh.GetSigner(...).
37-
framework.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
38+
e2eskipper.SkipUnlessProviderIs(framework.ProvidersWithSSH...)
3839

3940
// This test SSH's into the node for which it needs the $HOME/.ssh/id_rsa key to be present. So
4041
// we should skip if the environment does not have the key (not all CI systems support this use case)
41-
framework.SkipUnlessSSHKeyPresent()
42+
e2eskipper.SkipUnlessSSHKeyPresent()
4243
})
4344

4445
ginkgo.It("should SSH to all nodes and run commands", func() {

0 commit comments

Comments
 (0)