From f83a286fbcd7c013e724e4c56e2b4ea4f0d93101 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Thu, 19 May 2016 17:34:41 -0400 Subject: [PATCH] Check status of framework.CheckPodsRunningReady Check status of framework.CheckPodsRunningReady and fail test if it's false, instead of silently ignoring the failure. --- test/e2e/kubectl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index d6b0e26826f..28eb0bc4ab9 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -253,7 +253,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { podPath = framework.ReadOrDie(path.Join(kubeCtlManifestPath, "pod-with-readiness-probe.yaml")) By(fmt.Sprintf("creating the pod from %v", string(podPath))) framework.RunKubectlOrDieInput(string(podPath[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns)) - framework.CheckPodsRunningReady(c, ns, []string{simplePodName}, framework.PodStartTimeout) + Expect(framework.CheckPodsRunningReady(c, ns, []string{simplePodName}, framework.PodStartTimeout)).To(BeTrue()) }) AfterEach(func() { cleanupKubectlInputs(string(podPath[:]), ns, simplePodSelector) @@ -647,7 +647,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("creating the pod") nsFlag = fmt.Sprintf("--namespace=%v", ns) framework.RunKubectlOrDieInput(string(pod), "create", "-f", "-", nsFlag) - framework.CheckPodsRunningReady(c, ns, []string{simplePodName}, framework.PodStartTimeout) + Expect(framework.CheckPodsRunningReady(c, ns, []string{simplePodName}, framework.PodStartTimeout)).To(BeTrue()) }) AfterEach(func() { cleanupKubectlInputs(string(pod[:]), ns, simplePodSelector)