Adding a readiness probe to kubectl e2e tests.

pull/6/head
Maisem Ali 2016-02-08 15:38:17 -08:00
parent 3bbf55d38b
commit 3f58a0b15b
2 changed files with 21 additions and 2 deletions

View File

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

View File

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