Check status of framework.CheckPodsRunningReady

Check status of framework.CheckPodsRunningReady and fail test if it's false, instead of silently
ignoring the failure.
pull/6/head
Andy Goldstein 2016-05-19 17:34:41 -04:00
parent 7170c8910d
commit f83a286fbc
1 changed files with 2 additions and 2 deletions

View File

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