From e3b2ecdb23d5e40ec21e4fbd899b68fc68523f00 Mon Sep 17 00:00:00 2001 From: Erick Fejta Date: Sat, 19 Mar 2016 03:15:15 -0700 Subject: [PATCH 1/3] Use busybox:1.24 from gcr.io in kubectl.go --- test/e2e/kubectl.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 9fcf631bd4a..290dc9b6ed4 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -462,7 +462,7 @@ var _ = KubeDescribe("Kubectl client", func() { nsFlag := fmt.Sprintf("--namespace=%v", ns) By("executing a command with run and attach with stdin") - runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image=busybox", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). execOrDie() Expect(runOutput).To(ContainSubstring("abcd1234")) @@ -470,7 +470,7 @@ var _ = KubeDescribe("Kubectl client", func() { Expect(c.Extensions().Jobs(ns).Delete("run-test", nil)).To(BeNil()) By("executing a command with run and attach without stdin") - runOutput = newKubectlCommand(fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image=busybox", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput = newKubectlCommand(fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). execOrDie() Expect(runOutput).ToNot(ContainSubstring("abcd1234")) @@ -478,7 +478,7 @@ var _ = KubeDescribe("Kubectl client", func() { Expect(c.Extensions().Jobs(ns).Delete("run-test-2", nil)).To(BeNil()) By("executing a command with run and attach with stdin with open stdin should remain running") - runOutput = newKubectlCommand(nsFlag, "run", "run-test-3", "--image=busybox", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput = newKubectlCommand(nsFlag, "run", "run-test-3", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234\n"). execOrDie() Expect(runOutput).ToNot(ContainSubstring("stdin closed")) @@ -1079,7 +1079,7 @@ var _ = KubeDescribe("Kubectl client", func() { By("executing a command with run --rm and attach with stdin") t := time.NewTimer(runJobTimeout) defer t.Stop() - runOutput := newKubectlCommand(nsFlag, "run", jobName, "--image=busybox", "--rm=true", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput := newKubectlCommand(nsFlag, "run", jobName, "--image=gcr.io/google_containers/busybox:1.24", "--rm=true", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). withTimeout(t.C). execOrDie() From be5f27e3aa14099a90ca4082bf98c0d41d0ee721 Mon Sep 17 00:00:00 2001 From: Erick Fejta Date: Sat, 19 Mar 2016 16:02:29 -0700 Subject: [PATCH 2/3] Use tagged busybox image from gcr.io --- test/e2e/kubectl.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 290dc9b6ed4..9159089f9bf 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -73,6 +73,7 @@ const ( nginxDefaultOutput = "Welcome to nginx!" simplePodPort = 80 runJobTimeout = 5 * time.Minute + busyboxImage = "gcr.io/google_containers/busybox:1.24" nginxImage = "gcr.io/google_containers/nginx:1.7.9" ) @@ -462,7 +463,7 @@ var _ = KubeDescribe("Kubectl client", func() { nsFlag := fmt.Sprintf("--namespace=%v", ns) By("executing a command with run and attach with stdin") - runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image"+busyboxImage, "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). execOrDie() Expect(runOutput).To(ContainSubstring("abcd1234")) @@ -470,7 +471,7 @@ var _ = KubeDescribe("Kubectl client", func() { Expect(c.Extensions().Jobs(ns).Delete("run-test", nil)).To(BeNil()) By("executing a command with run and attach without stdin") - runOutput = newKubectlCommand(fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput = newKubectlCommand(fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image="+busyboxImage, "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). execOrDie() Expect(runOutput).ToNot(ContainSubstring("abcd1234")) @@ -478,7 +479,7 @@ var _ = KubeDescribe("Kubectl client", func() { Expect(c.Extensions().Jobs(ns).Delete("run-test-2", nil)).To(BeNil()) By("executing a command with run and attach with stdin with open stdin should remain running") - runOutput = newKubectlCommand(nsFlag, "run", "run-test-3", "--image=gcr.io/google_containers/busybox:1.24", "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput = newKubectlCommand(nsFlag, "run", "run-test-3", "--image="+busyboxImage, "--restart=Never", "--attach=true", "--leave-stdin-open=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234\n"). execOrDie() Expect(runOutput).ToNot(ContainSubstring("stdin closed")) @@ -1079,7 +1080,7 @@ var _ = KubeDescribe("Kubectl client", func() { By("executing a command with run --rm and attach with stdin") t := time.NewTimer(runJobTimeout) defer t.Stop() - runOutput := newKubectlCommand(nsFlag, "run", jobName, "--image=gcr.io/google_containers/busybox:1.24", "--rm=true", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput := newKubectlCommand(nsFlag, "run", jobName, "--image="+busyboxImage, "--rm=true", "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). withTimeout(t.C). execOrDie() From f9d5c81c617c74d249aaa15fff4c0d5b5f93e08d Mon Sep 17 00:00:00 2001 From: Erick Fejta Date: Sat, 19 Mar 2016 18:06:13 -0700 Subject: [PATCH 3/3] Add missing = --- test/e2e/kubectl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 9159089f9bf..07419f41841 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -463,7 +463,7 @@ var _ = KubeDescribe("Kubectl client", func() { nsFlag := fmt.Sprintf("--namespace=%v", ns) By("executing a command with run and attach with stdin") - runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image"+busyboxImage, "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). + runOutput := newKubectlCommand(nsFlag, "run", "run-test", "--image="+busyboxImage, "--restart=Never", "--attach=true", "--stdin", "--", "sh", "-c", "cat && echo 'stdin closed'"). withStdinData("abcd1234"). execOrDie() Expect(runOutput).To(ContainSubstring("abcd1234"))