Factor out providers which support SSH in e2e tests

This commit is contained in:
Dr. Stefan Schimanski 2015-09-29 10:53:54 +02:00
parent b9cfab87e3
commit a68e0848dc
4 changed files with 6 additions and 3 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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() {

View File

@ -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.