mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Use tagged busybox image from gcr.io
This commit is contained in:
parent
e3b2ecdb23
commit
be5f27e3aa
@ -73,6 +73,7 @@ const (
|
|||||||
nginxDefaultOutput = "Welcome to nginx!"
|
nginxDefaultOutput = "Welcome to nginx!"
|
||||||
simplePodPort = 80
|
simplePodPort = 80
|
||||||
runJobTimeout = 5 * time.Minute
|
runJobTimeout = 5 * time.Minute
|
||||||
|
busyboxImage = "gcr.io/google_containers/busybox:1.24"
|
||||||
nginxImage = "gcr.io/google_containers/nginx:1.7.9"
|
nginxImage = "gcr.io/google_containers/nginx:1.7.9"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -462,7 +463,7 @@ var _ = KubeDescribe("Kubectl client", func() {
|
|||||||
nsFlag := fmt.Sprintf("--namespace=%v", ns)
|
nsFlag := fmt.Sprintf("--namespace=%v", ns)
|
||||||
|
|
||||||
By("executing a command with run and attach with stdin")
|
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").
|
withStdinData("abcd1234").
|
||||||
execOrDie()
|
execOrDie()
|
||||||
Expect(runOutput).To(ContainSubstring("abcd1234"))
|
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())
|
Expect(c.Extensions().Jobs(ns).Delete("run-test", nil)).To(BeNil())
|
||||||
|
|
||||||
By("executing a command with run and attach without stdin")
|
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").
|
withStdinData("abcd1234").
|
||||||
execOrDie()
|
execOrDie()
|
||||||
Expect(runOutput).ToNot(ContainSubstring("abcd1234"))
|
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())
|
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")
|
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").
|
withStdinData("abcd1234\n").
|
||||||
execOrDie()
|
execOrDie()
|
||||||
Expect(runOutput).ToNot(ContainSubstring("stdin closed"))
|
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")
|
By("executing a command with run --rm and attach with stdin")
|
||||||
t := time.NewTimer(runJobTimeout)
|
t := time.NewTimer(runJobTimeout)
|
||||||
defer t.Stop()
|
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").
|
withStdinData("abcd1234").
|
||||||
withTimeout(t.C).
|
withTimeout(t.C).
|
||||||
execOrDie()
|
execOrDie()
|
||||||
|
Loading…
Reference in New Issue
Block a user