e2e: fix the expectation of always running kube-system pods

Instruct the tests to ignore image prepull pods.
This commit is contained in:
Yu-Ju Hong
2016-05-26 11:24:49 -07:00
parent 4357b8a0a6
commit 17928cc1dc
3 changed files with 25 additions and 6 deletions

View File

@@ -346,12 +346,14 @@ var _ = framework.KubeDescribe("Nodes [Disruptive]", func() {
var systemPodsNo int32
var c *client.Client
var ns string
ignoreLabels := framework.ImagePullerLabels
BeforeEach(func() {
c = f.Client
ns = f.Namespace.Name
systemPods, err := c.Pods(api.NamespaceSystem).List(api.ListOptions{})
systemPods, err := framework.GetPodsInNamespace(c, ns, ignoreLabels)
Expect(err).NotTo(HaveOccurred())
systemPodsNo = int32(len(systemPods.Items))
systemPodsNo = int32(len(systemPods))
})
// Slow issue #13323 (8 min)
@@ -396,7 +398,7 @@ var _ = framework.KubeDescribe("Nodes [Disruptive]", func() {
// the cluster is restored to health.
By("waiting for system pods to successfully restart")
err := framework.WaitForPodsRunningReady(api.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, framework.ImagePullerLabels)
err := framework.WaitForPodsRunningReady(api.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, ignoreLabels)
Expect(err).NotTo(HaveOccurred())
})