mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
Add missing guards around SSH based e2e tests
All other e2e tests which use SSH are skipped for providers other than gce, gke and aws. This patch does the same for - "should release NodePorts on delete" in service.go - "should test privileged pod" in privileged.go.
This commit is contained in:
parent
a68e0848dc
commit
657db0a2b5
@ -52,6 +52,7 @@ var _ = Describe("PrivilegedPod", func() {
|
||||
f: f,
|
||||
}
|
||||
It("should test privileged pod", func() {
|
||||
SkipUnlessProviderIs(providersWithSSH...)
|
||||
|
||||
By("Getting ssh-able hosts")
|
||||
hosts, err := NodeSSHHosts(config.f.Client)
|
||||
|
@ -532,6 +532,8 @@ var _ = Describe("Services", func() {
|
||||
ip := pickNodeIP(c)
|
||||
testReachable(ip, nodePort)
|
||||
|
||||
// this test uses NodeSSHHosts that does not work if a Node only reports LegacyHostIP
|
||||
if providerIs(providersWithSSH...) {
|
||||
hosts, err := NodeSSHHosts(c)
|
||||
if err != nil {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
@ -541,6 +543,7 @@ var _ = Describe("Services", func() {
|
||||
if code != 0 {
|
||||
Failf("expected node port (%d) to be in use", nodePort)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
It("should be able to change the type and nodeport settings of a service", func() {
|
||||
@ -965,6 +968,8 @@ var _ = Describe("Services", func() {
|
||||
err = t.DeleteService(serviceName)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
// this test uses NodeSSHHosts that does not work if a Node only reports LegacyHostIP
|
||||
if providerIs(providersWithSSH...) {
|
||||
hosts, err := NodeSSHHosts(c)
|
||||
if err != nil {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
@ -974,6 +979,7 @@ var _ = Describe("Services", func() {
|
||||
if code == 0 {
|
||||
Failf("expected node port (%d) to not be in use", nodePort)
|
||||
}
|
||||
}
|
||||
|
||||
By(fmt.Sprintf("creating service "+serviceName+" with same NodePort %d", nodePort))
|
||||
service = t.BuildServiceSpec()
|
||||
|
Loading…
Reference in New Issue
Block a user