mirror of https://github.com/containers/podman.git
Merge pull request #18570 from edsantiago/more_wait
e2e: fix more test races (missing "wait")
This commit is contained in:
commit
0104fe3244
|
@ -989,7 +989,8 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: alpine
|
||||||
image: quay.io/libpod/alpine:latest
|
image: quay.io/libpod/alpine:latest
|
||||||
command: ['sh', '-c', 'ls -l /proc/self/ns/ipc']
|
command: ['ls', '-l', '/proc/self/ns/ipc']
|
||||||
|
restartPolicy: Never
|
||||||
`
|
`
|
||||||
|
|
||||||
var podWithSysctlDefined = `
|
var podWithSysctlDefined = `
|
||||||
|
@ -1011,6 +1012,7 @@ spec:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
- "sysctl kernel.msgmax;sysctl net.core.somaxconn"
|
- "sysctl kernel.msgmax;sysctl net.core.somaxconn"
|
||||||
|
restartPolicy: Never
|
||||||
`
|
`
|
||||||
|
|
||||||
var podWithSysctlHostNetDefined = `
|
var podWithSysctlHostNetDefined = `
|
||||||
|
@ -2823,7 +2825,12 @@ var _ = Describe("Podman play kube", func() {
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(Exit(0))
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
logs := podmanTest.Podman([]string{"logs", getCtrNameInPod(pod)})
|
podName := getCtrNameInPod(pod)
|
||||||
|
wait := podmanTest.Podman([]string{"wait", podName})
|
||||||
|
wait.WaitWithDefaultTimeout()
|
||||||
|
Expect(wait).Should(Exit(0))
|
||||||
|
|
||||||
|
logs := podmanTest.Podman([]string{"logs", podName})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(Exit(0))
|
Expect(logs).Should(Exit(0))
|
||||||
Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted"))
|
Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted"))
|
||||||
|
@ -2837,6 +2844,7 @@ var _ = Describe("Podman play kube", func() {
|
||||||
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
|
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(Exit(125))
|
Expect(kube).Should(Exit(125))
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring(BB_GLIBC + ": image not known"))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman play kube with pull policy of missing", func() {
|
It("podman play kube with pull policy of missing", func() {
|
||||||
|
@ -5251,6 +5259,10 @@ spec:
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(Exit(0))
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
|
wait := podmanTest.Podman([]string{"wait", "test-hostipc-alpine"})
|
||||||
|
wait.WaitWithDefaultTimeout()
|
||||||
|
Expect(wait).Should(Exit(0))
|
||||||
|
|
||||||
inspect := podmanTest.Podman([]string{"inspect", "test-hostipc-alpine", "--format", "{{ .HostConfig.IpcMode }}"})
|
inspect := podmanTest.Podman([]string{"inspect", "test-hostipc-alpine", "--format", "{{ .HostConfig.IpcMode }}"})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
Expect(inspect).Should(Exit(0))
|
Expect(inspect).Should(Exit(0))
|
||||||
|
@ -5268,7 +5280,7 @@ spec:
|
||||||
fields = strings.Split(logs.OutputToString(), " ")
|
fields = strings.Split(logs.OutputToString(), " ")
|
||||||
ctrIpcNS := strings.TrimSuffix(fields[len(fields)-1], "\n")
|
ctrIpcNS := strings.TrimSuffix(fields[len(fields)-1], "\n")
|
||||||
|
|
||||||
Expect(hostIpcNS).To(Equal(ctrIpcNS))
|
Expect(ctrIpcNS).To(Equal(hostIpcNS), "container IPC NS == host IPC NS")
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman play kube with ctrName should be in network alias", func() {
|
It("podman play kube with ctrName should be in network alias", func() {
|
||||||
|
@ -5306,6 +5318,10 @@ spec:
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(Exit(0))
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
|
wait := podmanTest.Podman([]string{"wait", "test-sysctl-alpine"})
|
||||||
|
wait.WaitWithDefaultTimeout()
|
||||||
|
Expect(wait).Should(Exit(0))
|
||||||
|
|
||||||
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-sysctl-alpine", "test-sysctl"})
|
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-sysctl-alpine", "test-sysctl"})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(Exit(0))
|
Expect(logs).Should(Exit(0))
|
||||||
|
@ -5321,5 +5337,6 @@ spec:
|
||||||
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
|
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(Exit(125))
|
Expect(kube).Should(Exit(125))
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring("since Network Namespace set to host: invalid argument"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue