mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Factor out providers which support SSH in e2e tests
This commit is contained in:
parent
b9cfab87e3
commit
a68e0848dc
@ -38,7 +38,7 @@ func CoreDump(dir string) {
|
||||
provider := testContext.Provider
|
||||
|
||||
// requires ssh
|
||||
if !providerIs("gce", "gke") {
|
||||
if !providerIs(providersWithSSH...) {
|
||||
fmt.Printf("Skipping SSH core dump, which is not implemented for %s", provider)
|
||||
return
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ var _ = Describe("Services", func() {
|
||||
|
||||
It("should be able to up and down services", func() {
|
||||
// this test uses NodeSSHHosts that does not work if a Node only reports LegacyHostIP
|
||||
SkipUnlessProviderIs("gce", "gke", "aws")
|
||||
SkipUnlessProviderIs(providersWithSSH...)
|
||||
ns := namespaces[0]
|
||||
numPods, servicePort := 3, 80
|
||||
|
||||
|
@ -35,7 +35,7 @@ var _ = Describe("SSH", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
// When adding more providers here, also implement their functionality in util.go's getSigner(...).
|
||||
SkipUnlessProviderIs("gce", "gke")
|
||||
SkipUnlessProviderIs(providersWithSSH...)
|
||||
})
|
||||
|
||||
It("should SSH to all nodes and run commands", func() {
|
||||
|
@ -241,6 +241,9 @@ func providerIs(providers ...string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// providersWithSSH are those providers where each node is accessible with SSH
|
||||
var providersWithSSH = []string{"gce", "gke", "aws"}
|
||||
|
||||
type podCondition func(pod *api.Pod) (bool, error)
|
||||
|
||||
// podReady returns whether pod has a condition of Ready with a status of true.
|
||||
|
Loading…
Reference in New Issue
Block a user