From 9c701a47e2bde67375745773f5cf6fd1023ee8c5 Mon Sep 17 00:00:00 2001 From: goltermann Date: Fri, 26 Feb 2016 16:35:21 -0800 Subject: [PATCH] Fixes to Downward and Secrets E2E examples. --- test/e2e/examples.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/e2e/examples.go b/test/e2e/examples.go index de9d701965e..714c7740278 100644 --- a/test/e2e/examples.go +++ b/test/e2e/examples.go @@ -336,13 +336,16 @@ var _ = Describe("[Feature:Example]", func() { secretYaml := mkpath("secret.yaml") podYaml := mkpath("secret-pod.yaml") nsFlag := fmt.Sprintf("--namespace=%v", ns) + podName := "secret-test-pod" By("creating secret and pod") runKubectlOrDie("create", "-f", secretYaml, nsFlag) runKubectlOrDie("create", "-f", podYaml, nsFlag) + err := waitForPodNoLongerRunningInNamespace(c, podName, ns) + Expect(err).NotTo(HaveOccurred()) By("checking if secret was read correctly") - _, err := lookForStringInLog(ns, "secret-test-pod", "test-container", "value-1", serverStartTimeout) + _, err = lookForStringInLog(ns, "secret-test-pod", "test-container", "value-1", serverStartTimeout) Expect(err).NotTo(HaveOccurred()) }) }) @@ -358,11 +361,13 @@ var _ = Describe("[Feature:Example]", func() { By("creating the pod") runKubectlOrDie("create", "-f", podYaml, nsFlag) + err := waitForPodNoLongerRunningInNamespace(c, podName, ns) + Expect(err).NotTo(HaveOccurred()) By("checking if name and namespace were passed correctly") - _, err := lookForStringInLog(ns, podName, "test-container", fmt.Sprintf("POD_NAMESPACE=%v", ns), serverStartTimeout) + _, err = lookForStringInLog(ns, podName, "test-container", fmt.Sprintf("MY_POD_NAMESPACE=%v", ns), serverStartTimeout) Expect(err).NotTo(HaveOccurred()) - _, err = lookForStringInLog(ns, podName, "test-container", fmt.Sprintf("POD_NAME=%v", podName), serverStartTimeout) + _, err = lookForStringInLog(ns, podName, "test-container", fmt.Sprintf("MY_POD_NAME=%v", podName), serverStartTimeout) Expect(err).NotTo(HaveOccurred()) }) })