Fix kube-ui e2e test waiting for the rc pods

Kube-ui pods do not have the {"name":rcName} label like pods created in
e2e tests. Hence, we cannot use the waitForRCPods function directly, but
have to pass a custom label.
This commit is contained in:
Dr. Stefan Schimanski
2015-10-18 14:16:52 +01:00
parent d11a3930c0
commit f866243e0a
2 changed files with 18 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util/wait"
. "github.com/onsi/ginkgo"
@@ -30,7 +31,7 @@ import (
var _ = Describe("kube-ui", func() {
const (
uiServiceName = "kube-ui"
uiRcName = uiServiceName
uiAppName = uiServiceName
uiNamespace = api.NamespaceSystem
serverStartTimeout = 1 * time.Minute
@@ -44,7 +45,8 @@ var _ = Describe("kube-ui", func() {
Expect(err).NotTo(HaveOccurred())
By("Checking to make sure the kube-ui pods are running")
err = waitForRCPodsRunning(f.Client, uiNamespace, uiRcName)
selector := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": uiAppName}))
err = waitForPodsWithLabelRunning(f.Client, uiNamespace, selector)
Expect(err).NotTo(HaveOccurred())
By("Checking to make sure we get a response from the kube-ui.")