Commit f83a286f authored by Andy Goldstein's avatar Andy Goldstein

Check status of framework.CheckPodsRunningReady

Check status of framework.CheckPodsRunningReady and fail test if it's false, instead of silently ignoring the failure.
parent 7170c891
...@@ -253,7 +253,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { ...@@ -253,7 +253,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
podPath = framework.ReadOrDie(path.Join(kubeCtlManifestPath, "pod-with-readiness-probe.yaml")) podPath = framework.ReadOrDie(path.Join(kubeCtlManifestPath, "pod-with-readiness-probe.yaml"))
By(fmt.Sprintf("creating the pod from %v", string(podPath))) By(fmt.Sprintf("creating the pod from %v", string(podPath)))
framework.RunKubectlOrDieInput(string(podPath[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns)) 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() { AfterEach(func() {
cleanupKubectlInputs(string(podPath[:]), ns, simplePodSelector) cleanupKubectlInputs(string(podPath[:]), ns, simplePodSelector)
...@@ -647,7 +647,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { ...@@ -647,7 +647,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
By("creating the pod") By("creating the pod")
nsFlag = fmt.Sprintf("--namespace=%v", ns) nsFlag = fmt.Sprintf("--namespace=%v", ns)
framework.RunKubectlOrDieInput(string(pod), "create", "-f", "-", nsFlag) 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() { AfterEach(func() {
cleanupKubectlInputs(string(pod[:]), ns, simplePodSelector) cleanupKubectlInputs(string(pod[:]), ns, simplePodSelector)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment