From 3f58a0b15b527119a0de407bd5d4fd18cbbce3ac Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Mon, 8 Feb 2016 15:38:17 -0800 Subject: [PATCH] Adding a readiness probe to kubectl e2e tests. --- examples/readiness-probe-pod | 19 +++++++++++++++++++ test/e2e/kubectl.go | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 examples/readiness-probe-pod diff --git a/examples/readiness-probe-pod b/examples/readiness-probe-pod new file mode 100644 index 00000000000..247814c8793 --- /dev/null +++ b/examples/readiness-probe-pod @@ -0,0 +1,19 @@ +# Copy of pod.yaml without file extension for test +apiVersion: v1 +kind: Pod +metadata: + name: nginx + labels: + name: nginx +spec: + containers: + - name: nginx + image: nginx + ports: + - containerPort: 80 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + timeoutSeconds: 5 diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index b2b7b7f1e3d..d5d02b53db0 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -170,8 +170,8 @@ var _ = Describe("Kubectl client", func() { var podPath string BeforeEach(func() { - podPath = filepath.Join(testContext.RepoRoot, "docs/user-guide/pod.yaml") - By("creating the pod") + podPath = filepath.Join(testContext.RepoRoot, "examples/readiness-probe-pod") + By(fmt.Sprintf("creating the pod from %v", podPath)) runKubectlOrDie("create", "-f", podPath, fmt.Sprintf("--namespace=%v", ns)) checkPodsRunningReady(c, ns, []string{simplePodName}, podStartTimeout) })