diff --git a/test/e2e/privileged.go b/test/e2e/privileged.go index e2cbf5f1ea4..b2cf98e08f1 100644 --- a/test/e2e/privileged.go +++ b/test/e2e/privileged.go @@ -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) diff --git a/test/e2e/service.go b/test/e2e/service.go index e8d4fbcd6ae..a31b38f8675 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -532,14 +532,17 @@ var _ = Describe("Services", func() { ip := pickNodeIP(c) testReachable(ip, nodePort) - hosts, err := NodeSSHHosts(c) - if err != nil { - Expect(err).NotTo(HaveOccurred()) - } - cmd := fmt.Sprintf(`test -n "$(ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN)"`, nodePort) - _, _, code, err := SSH(cmd, hosts[0], testContext.Provider) - if code != 0 { - Failf("expected node port (%d) to be in use", 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()) + } + cmd := fmt.Sprintf(`test -n "$(ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN)"`, nodePort) + _, _, code, err := SSH(cmd, hosts[0], testContext.Provider) + if code != 0 { + Failf("expected node port (%d) to be in use", nodePort) + } } }) @@ -965,14 +968,17 @@ var _ = Describe("Services", func() { err = t.DeleteService(serviceName) Expect(err).NotTo(HaveOccurred()) - hosts, err := NodeSSHHosts(c) - if err != nil { - Expect(err).NotTo(HaveOccurred()) - } - cmd := fmt.Sprintf(`test -n "$(ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN)"`, nodePort) - _, _, code, err := SSH(cmd, hosts[0], testContext.Provider) - if code == 0 { - Failf("expected node port (%d) to not be in use", 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()) + } + cmd := fmt.Sprintf(`test -n "$(ss -ant46 'sport = :%d' | tail -n +2 | grep LISTEN)"`, nodePort) + _, _, code, err := SSH(cmd, hosts[0], testContext.Provider) + 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))