Ensure that e2e tests run on gce|gke and are appropriately

skipped for other cloud providers.
This commit is contained in:
Robert Bailey
2015-04-18 15:30:10 -07:00
parent b37328a551
commit feb7abcada
9 changed files with 31 additions and 22 deletions

View File

@@ -62,6 +62,18 @@ func Failf(format string, a ...interface{}) {
Fail(fmt.Sprintf(format, a...), 1)
}
func providerIs(providers ...string) bool {
if testContext.Provider == "" {
Fail("testContext.Provider is not defined")
}
for _, provider := range providers {
if strings.ToLower(provider) == strings.ToLower(testContext.Provider) {
return true
}
}
return false
}
type podCondition func(pod *api.Pod) (bool, error)
func waitForPodCondition(c *client.Client, ns, podName, desc string, condition podCondition) error {