mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
e2e: ExitCleanly(): Fixes for breaking tests
Commit 3 of 3, and this one's a doozy. Sorry. The main problem was that "kube play" re-pulled images. To solve that, I changed PullPolicy to "missing" and, where possible, replaced alpine/busybox with CITEST_IMAGE because that one seems to be cached better? I couldn't figure out why, but even without the PullPolicy change everything worked better with CITEST_IMAGE. And it's a better image to use anyway. Other lesser changes (like adding "-q") as needed. Also: - in four tests that use "replica", we can't use ExitCleanly() because of a run-time warning. Add a check for that warning. - remove a workaround for a long-closed issue (c/storage 1232) Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -67,7 +67,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -87,7 +89,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -121,7 +125,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -141,7 +147,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -161,7 +169,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -180,7 +190,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myctr
|
- name: myctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
|
command:
|
||||||
|
- top
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: foo
|
- name: foo
|
||||||
mountPath: /etc/foo
|
mountPath: /etc/foo
|
||||||
@ -197,7 +209,7 @@ metadata:
|
|||||||
name: libpod-test
|
name: libpod-test
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: quay.io/libpod/alpine_nginx:latest
|
- image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- sleep
|
- sleep
|
||||||
- "3600"`
|
- "3600"`
|
||||||
@ -236,7 +248,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: podnameEqualsContainerNameYaml
|
- name: podnameEqualsContainerNameYaml
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
`
|
`
|
||||||
|
|
||||||
var podWithoutAName = `
|
var podWithoutAName = `
|
||||||
@ -245,7 +257,7 @@ kind: Pod
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: podDoesntHaveAName
|
- name: podDoesntHaveAName
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
`
|
`
|
||||||
@ -258,7 +270,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: testctr
|
- name: testctr
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- sleep
|
- sleep
|
||||||
- inf
|
- inf
|
||||||
@ -281,8 +293,8 @@ metadata:
|
|||||||
name: check-infra-image
|
name: check-infra-image
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- sleep
|
- sleep
|
||||||
- 24h
|
- 24h
|
||||||
@ -296,8 +308,8 @@ metadata:
|
|||||||
name: testpod1
|
name: testpod1
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: mycm
|
- name: mycm
|
||||||
mountPath: /mycm
|
mountPath: /mycm
|
||||||
@ -324,8 +336,8 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: HOSTNAME
|
- name: HOSTNAME
|
||||||
value: label-pod
|
value: label-pod
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
name: alpine
|
name: testimage
|
||||||
resources: {}
|
resources: {}
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
@ -345,24 +357,24 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: liveness-probe
|
name: liveness-probe
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: alpine
|
app: testimage
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- command:
|
- command:
|
||||||
- top
|
- top
|
||||||
- -d
|
- -d
|
||||||
- "1.5"
|
- "1.5"
|
||||||
name: alpine
|
name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
@ -377,16 +389,16 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: liveness-unhealthy-probe
|
name: liveness-unhealthy-probe
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: alpine
|
app: testimage
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
@ -394,8 +406,8 @@ spec:
|
|||||||
- top
|
- top
|
||||||
- -d
|
- -d
|
||||||
- "1.5"
|
- "1.5"
|
||||||
name: alpine
|
name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
@ -411,16 +423,16 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: startup-healthy-probe
|
name: startup-healthy-probe
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: alpine
|
app: testimage
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: alpine
|
app: testimage
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
@ -428,8 +440,8 @@ spec:
|
|||||||
- top
|
- top
|
||||||
- -d
|
- -d
|
||||||
- "1.5"
|
- "1.5"
|
||||||
name: alpine
|
name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
startupProbe:
|
startupProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
@ -464,7 +476,7 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: HOSTNAME
|
- name: HOSTNAME
|
||||||
value: label-pod
|
value: label-pod
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
name: test
|
name: test
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
@ -1039,7 +1051,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + NGINX_IMAGE + `
|
||||||
|
imagePullPolicy: missing
|
||||||
`
|
`
|
||||||
|
|
||||||
var publishPortsPodWithContainerPort = `
|
var publishPortsPodWithContainerPort = `
|
||||||
@ -1050,7 +1063,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + NGINX_IMAGE + `
|
||||||
|
imagePullPolicy: missing
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
`
|
`
|
||||||
@ -1063,7 +1077,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: quay.io/libpod/alpine_nginx:latest
|
image: ` + NGINX_IMAGE + `
|
||||||
|
imagePullPolicy: missing
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
hostPort: 19001
|
hostPort: 19001
|
||||||
@ -1077,7 +1092,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: udp-echo
|
- name: udp-echo
|
||||||
image: quay.io/libpod/busybox:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
@ -1087,7 +1102,7 @@ spec:
|
|||||||
hostPort: 19009
|
hostPort: 19009
|
||||||
protocol: udp
|
protocol: udp
|
||||||
- name: tcp-echo
|
- name: tcp-echo
|
||||||
image: quay.io/libpod/busybox:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
@ -1102,13 +1117,13 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: udp-echo
|
- name: udp-echo
|
||||||
image: quay.io/libpod/busybox:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
- "nc -ulk -p 19008 -e /bin/cat"
|
- "nc -ulk -p 19008 -e /bin/cat"
|
||||||
- name: tcp-echo
|
- name: tcp-echo
|
||||||
image: quay.io/libpod/busybox:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
@ -1127,8 +1142,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
hostPID: true
|
hostPID: true
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command: ['sh', '-c', 'echo $$']
|
command: ['sh', '-c', 'echo $$']
|
||||||
`
|
`
|
||||||
|
|
||||||
@ -1140,8 +1155,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
hostIPC: true
|
hostIPC: true
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command: ['ls', '-l', '/proc/self/ns/ipc']
|
command: ['ls', '-l', '/proc/self/ns/ipc']
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
`
|
`
|
||||||
@ -1159,8 +1174,8 @@ spec:
|
|||||||
- name: net.core.somaxconn
|
- name: net.core.somaxconn
|
||||||
value: "65535"
|
value: "65535"
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
@ -1182,8 +1197,8 @@ spec:
|
|||||||
value: "65535"
|
value: "65535"
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: testimage
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-c"
|
- "-c"
|
||||||
@ -1207,7 +1222,7 @@ items:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: container
|
- name: container
|
||||||
image: quay.io/libpod/alpine:latest
|
image: ` + CITEST_IMAGE + `
|
||||||
command: [ "/bin/sh", "-c", "env" ]
|
command: [ "/bin/sh", "-c", "env" ]
|
||||||
env:
|
env:
|
||||||
- name: FOO
|
- name: FOO
|
||||||
@ -1222,7 +1237,7 @@ var (
|
|||||||
defaultCtrName = "testCtr"
|
defaultCtrName = "testCtr"
|
||||||
defaultCtrCmd = []string{"top"}
|
defaultCtrCmd = []string{"top"}
|
||||||
defaultCtrArg = []string{"-d", "1.5"}
|
defaultCtrArg = []string{"-d", "1.5"}
|
||||||
defaultCtrImage = ALPINE
|
defaultCtrImage = CITEST_IMAGE
|
||||||
defaultPodName = "testPod"
|
defaultPodName = "testPod"
|
||||||
defaultVolName = "testVol"
|
defaultVolName = "testVol"
|
||||||
defaultDaemonSetName = "testDaemonSet"
|
defaultDaemonSetName = "testDaemonSet"
|
||||||
@ -1667,7 +1682,7 @@ func getCtr(options ...ctrOption) *Ctr {
|
|||||||
Caps: false,
|
Caps: false,
|
||||||
CapAdd: nil,
|
CapAdd: nil,
|
||||||
CapDrop: nil,
|
CapDrop: nil,
|
||||||
PullPolicy: "",
|
PullPolicy: "missing",
|
||||||
HostIP: "",
|
HostIP: "",
|
||||||
Port: "",
|
Port: "",
|
||||||
VolumeMount: false,
|
VolumeMount: false,
|
||||||
@ -2271,7 +2286,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
inspect := podmanTest.Podman([]string{"inspect", "liveness-probe-pod-alpine", "--format", "'{{ .Config.Healthcheck }}'"})
|
inspect := podmanTest.Podman([]string{"inspect", "liveness-probe-pod-testimage", "--format", "'{{ .Config.Healthcheck }}'"})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
healthcheckcmd := inspect.OutputToString()
|
healthcheckcmd := inspect.OutputToString()
|
||||||
// check if CMD-SHELL based equivalent health check is added to container
|
// check if CMD-SHELL based equivalent health check is added to container
|
||||||
@ -2287,14 +2302,14 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
hc := podmanTest.Podman([]string{"healthcheck", "run", "liveness-unhealthy-probe-pod-alpine"})
|
hc := podmanTest.Podman([]string{"healthcheck", "run", "liveness-unhealthy-probe-pod-testimage"})
|
||||||
hc.WaitWithDefaultTimeout()
|
hc.WaitWithDefaultTimeout()
|
||||||
hcoutput := hc.OutputToString()
|
hcoutput := hc.OutputToString()
|
||||||
Expect(hcoutput).To(ContainSubstring(define.HealthCheckUnhealthy))
|
Expect(hcoutput).To(ContainSubstring(define.HealthCheckUnhealthy))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("support container startup probe", func() {
|
It("support container startup probe", func() {
|
||||||
ctrName := "startup-healthy-probe-pod-alpine"
|
ctrName := "startup-healthy-probe-pod-testimage"
|
||||||
err := writeYaml(startupProbePodYaml, kubeYaml)
|
err := writeYaml(startupProbePodYaml, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
@ -2408,7 +2423,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
// With annotation set to always
|
// With annotation set to always
|
||||||
It("test with init containers and annotation set", func() {
|
It("test with init containers and annotation set", func() {
|
||||||
// With the init container type annotation set to always
|
// With the init container type annotation set to always
|
||||||
pod := getPod(withAnnotation("io.podman.annotations.init.container.type", "always"), withPodInitCtr(getCtr(withImage(ALPINE), withCmd([]string{"printenv", "container"}), withInitCtr(), withName("init-test"))), withCtr(getCtr(withImage(ALPINE), withCmd([]string{"top"}))))
|
pod := getPod(withAnnotation("io.podman.annotations.init.container.type", "always"), withPodInitCtr(getCtr(withImage(CITEST_IMAGE), withCmd([]string{"printenv", "container"}), withInitCtr(), withName("init-test"))), withCtr(getCtr(withImage(CITEST_IMAGE), withCmd([]string{"top"}))))
|
||||||
err := generateKubeYaml("pod", pod, kubeYaml)
|
err := generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
@ -2449,7 +2464,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
// Using default init container type (once)
|
// Using default init container type (once)
|
||||||
It("test with init container type set to default value", func() {
|
It("test with init container type set to default value", func() {
|
||||||
// Using the default init container type (once)
|
// Using the default init container type (once)
|
||||||
pod := getPod(withPodInitCtr(getCtr(withImage(ALPINE), withCmd([]string{"echo", "hello"}), withInitCtr(), withName("init-test"))), withCtr(getCtr(withImage(ALPINE), withCmd([]string{"top"}))))
|
pod := getPod(withPodInitCtr(getCtr(withImage(CITEST_IMAGE), withCmd([]string{"echo", "hello"}), withInitCtr(), withName("init-test"))), withCtr(getCtr(withImage(CITEST_IMAGE), withCmd([]string{"top"}))))
|
||||||
err := generateKubeYaml("pod", pod, kubeYaml)
|
err := generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
@ -2862,7 +2877,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).To(ExitWithError())
|
Expect(kube).To(ExitWithError())
|
||||||
|
|
||||||
p = getPod(withPodInitCtr(getCtr(withImage(ALPINE), withCmd([]string{"echo", "hello"}), withInitCtr(), withName("initctr"))), withCtr(getCtr(withImage(ALPINE), withName("initctr"), withCmd([]string{"top"}))))
|
p = getPod(withPodInitCtr(getCtr(withImage(CITEST_IMAGE), withCmd([]string{"echo", "hello"}), withInitCtr(), withName("initctr"))), withCtr(getCtr(withImage(CITEST_IMAGE), withName("initctr"), withCmd([]string{"top"}))))
|
||||||
|
|
||||||
err = generateKubeYaml("pod", p, kubeYaml)
|
err = generateKubeYaml("pod", p, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3043,7 +3058,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
|
|
||||||
logs := podmanTest.Podman([]string{"logs", podName})
|
logs := podmanTest.Podman([]string{"logs", podName})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(ExitCleanly())
|
Expect(logs).Should(Exit(0))
|
||||||
Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted"))
|
Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted"))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -3059,7 +3074,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("with pull policy of missing", func() {
|
It("with pull policy of missing", func() {
|
||||||
ctr := getCtr(withPullPolicy("Missing"), withImage(BB))
|
ctr := getCtr(withPullPolicy("Missing"), withImage(CITEST_IMAGE))
|
||||||
err := generateKubeYaml("pod", getPod(withCtr(ctr)), kubeYaml)
|
err := generateKubeYaml("pod", getPod(withCtr(ctr)), kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
@ -3091,7 +3106,8 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
// Cannot ExitCleanly() because pull output goes to stderr
|
||||||
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
inspect = podmanTest.Podman([]string{"inspect", BB})
|
inspect = podmanTest.Podman([]string{"inspect", BB})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
@ -3103,6 +3119,7 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
oldBB := "quay.io/libpod/busybox:1.30.1"
|
oldBB := "quay.io/libpod/busybox:1.30.1"
|
||||||
pull := podmanTest.Podman([]string{"pull", oldBB})
|
pull := podmanTest.Podman([]string{"pull", oldBB})
|
||||||
pull.WaitWithDefaultTimeout()
|
pull.WaitWithDefaultTimeout()
|
||||||
|
Expect(pull).Should(Exit(0))
|
||||||
|
|
||||||
tag := podmanTest.Podman([]string{"tag", oldBB, BB})
|
tag := podmanTest.Podman([]string{"tag", oldBB, BB})
|
||||||
tag.WaitWithDefaultTimeout()
|
tag.WaitWithDefaultTimeout()
|
||||||
@ -3116,13 +3133,14 @@ var _ = Describe("Podman kube play", func() {
|
|||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
oldBBinspect := inspect.InspectImageJSON()
|
oldBBinspect := inspect.InspectImageJSON()
|
||||||
|
|
||||||
ctr := getCtr(withImage(BB))
|
ctr := getCtr(withImage(BB), withPullPolicy(""))
|
||||||
err := generateKubeYaml("pod", getPod(withCtr(ctr)), kubeYaml)
|
err := generateKubeYaml("pod", getPod(withCtr(ctr)), kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
// Cannot ExitCleanly() because pull output goes to stderr
|
||||||
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
inspect = podmanTest.Podman([]string{"inspect", BB})
|
inspect = podmanTest.Podman([]string{"inspect", BB})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
@ -3141,12 +3159,12 @@ spec:
|
|||||||
- image: demo
|
- image: demo
|
||||||
name: demo_kube
|
name: demo_kube
|
||||||
`
|
`
|
||||||
pull := podmanTest.Podman([]string{"create", "--workdir", "/etc", "--name", "newBB", "--label", "key1=value1", "alpine"})
|
pull := podmanTest.Podman([]string{"create", "--workdir", "/etc", "--name", "newBB", "--label", "key1=value1", CITEST_IMAGE})
|
||||||
|
|
||||||
pull.WaitWithDefaultTimeout()
|
pull.WaitWithDefaultTimeout()
|
||||||
Expect(pull).Should(ExitCleanly())
|
Expect(pull).Should(ExitCleanly())
|
||||||
|
|
||||||
c := podmanTest.Podman([]string{"commit", "-c", "STOPSIGNAL=51", "newBB", "demo"})
|
c := podmanTest.Podman([]string{"commit", "-q", "-c", "STOPSIGNAL=51", "newBB", "demo"})
|
||||||
c.WaitWithDefaultTimeout()
|
c.WaitWithDefaultTimeout()
|
||||||
Expect(c).Should(ExitCleanly())
|
Expect(c).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -3213,7 +3231,12 @@ spec:
|
|||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(Exit(0))
|
||||||
|
if IsRemote() {
|
||||||
|
Expect(kube.ErrorToString()).To(BeEmpty())
|
||||||
|
} else {
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring("Limiting replica count to 1, more than one replica is not supported by Podman"))
|
||||||
|
}
|
||||||
|
|
||||||
podName := getPodNameInDeployment(deployment)
|
podName := getPodNameInDeployment(deployment)
|
||||||
|
|
||||||
@ -3249,7 +3272,12 @@ spec:
|
|||||||
|
|
||||||
kube := podmanTest.Podman(append(playArgs, kubeYaml))
|
kube := podmanTest.Podman(append(playArgs, kubeYaml))
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(Exit(0))
|
||||||
|
if IsRemote() {
|
||||||
|
Expect(kube.ErrorToString()).To(BeEmpty())
|
||||||
|
} else {
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring("Limiting replica count to 1, more than one replica is not supported by Podman"))
|
||||||
|
}
|
||||||
|
|
||||||
podName := getPodNameInDeployment(deployment)
|
podName := getPodNameInDeployment(deployment)
|
||||||
|
|
||||||
@ -3266,7 +3294,7 @@ spec:
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("with multiple networks", func() {
|
It("with multiple networks", func() {
|
||||||
ctr := getCtr(withImage(ALPINE))
|
ctr := getCtr(withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withCtr(ctr))
|
pod := getPod(withCtr(ctr))
|
||||||
err := generateKubeYaml("pod", pod, kubeYaml)
|
err := generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3303,7 +3331,7 @@ spec:
|
|||||||
It("test with network portbindings", func() {
|
It("test with network portbindings", func() {
|
||||||
ip := "127.0.0.100"
|
ip := "127.0.0.100"
|
||||||
port := "8087"
|
port := "8087"
|
||||||
ctr := getCtr(withHostIP(ip, port), withImage(BB))
|
ctr := getCtr(withHostIP(ip, port), withImage(CITEST_IMAGE))
|
||||||
|
|
||||||
pod := getPod(withCtr(ctr))
|
pod := getPod(withCtr(ctr))
|
||||||
err := generateKubeYaml("pod", pod, kubeYaml)
|
err := generateKubeYaml("pod", pod, kubeYaml)
|
||||||
@ -3458,7 +3486,7 @@ spec:
|
|||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
f.Close()
|
f.Close()
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount(hostPathLocation, "", true), withImage(BB))
|
ctr := getCtr(withVolumeMount(hostPathLocation, "", true), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getHostPathVolume("File", hostPathLocation)), withCtr(ctr))
|
pod := getPod(withVolume(getHostPathVolume("File", hostPathLocation)), withCtr(ctr))
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3498,7 +3526,7 @@ spec:
|
|||||||
// Create container image with named volume
|
// Create container image with named volume
|
||||||
containerfile := fmt.Sprintf(`
|
containerfile := fmt.Sprintf(`
|
||||||
FROM %s
|
FROM %s
|
||||||
VOLUME %s`, ALPINE, hostPathDir+"/")
|
VOLUME %s`, CITEST_IMAGE, hostPathDir+"/")
|
||||||
|
|
||||||
image := "podman-kube-test:podman"
|
image := "podman-kube-test:podman"
|
||||||
podmanTest.BuildImage(containerfile, image, "false")
|
podmanTest.BuildImage(containerfile, image, "false")
|
||||||
@ -3532,7 +3560,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
It("test with PersistentVolumeClaim volume", func() {
|
It("test with PersistentVolumeClaim volume", func() {
|
||||||
volumeName := "namedVolume"
|
volumeName := "namedVolume"
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getPersistentVolumeClaimVolume(volumeName)), withCtr(ctr))
|
pod := getPod(withVolume(getPersistentVolumeClaimVolume(volumeName)), withCtr(ctr))
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3555,7 +3583,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
cmYaml, err := getKubeYaml("configmap", cm)
|
cmYaml, err := getKubeYaml("configmap", cm)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getConfigMapVolume(volumeName, []map[string]string{}, false)), withCtr(ctr))
|
pod := getPod(withVolume(getConfigMapVolume(volumeName, []map[string]string{}, false)), withCtr(ctr))
|
||||||
podYaml, err := getKubeYaml("pod", pod)
|
podYaml, err := getKubeYaml("pod", pod)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3583,7 +3611,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
"path": "BAR",
|
"path": "BAR",
|
||||||
}}
|
}}
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getConfigMapVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
pod := getPod(withVolume(getConfigMapVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
||||||
podYaml, err := getKubeYaml("pod", pod)
|
podYaml, err := getKubeYaml("pod", pod)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3608,7 +3636,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
It("with a missing optional ConfigMap volume", func() {
|
It("with a missing optional ConfigMap volume", func() {
|
||||||
volumeName := "cmVol"
|
volumeName := "cmVol"
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getConfigMapVolume(volumeName, []map[string]string{}, true)), withCtr(ctr))
|
pod := getPod(withVolume(getConfigMapVolume(volumeName, []map[string]string{}, true)), withCtr(ctr))
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3622,8 +3650,8 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
podName := "test-pod"
|
podName := "test-pod"
|
||||||
ctrName1 := "vol-test-ctr"
|
ctrName1 := "vol-test-ctr"
|
||||||
ctrName2 := "vol-test-ctr-2"
|
ctrName2 := "vol-test-ctr-2"
|
||||||
ctr1 := getCtr(withVolumeMount("/test-emptydir", "", false), withImage(BB), withName(ctrName1))
|
ctr1 := getCtr(withVolumeMount("/test-emptydir", "", false), withImage(CITEST_IMAGE), withName(ctrName1))
|
||||||
ctr2 := getCtr(withVolumeMount("/test-emptydir-2", "", false), withImage(BB), withName(ctrName2))
|
ctr2 := getCtr(withVolumeMount("/test-emptydir-2", "", false), withImage(CITEST_IMAGE), withName(ctrName2))
|
||||||
pod := getPod(withPodName(podName), withVolume(getEmptyDirVolume()), withCtr(ctr1), withCtr(ctr2))
|
pod := getPod(withPodName(podName), withVolume(getEmptyDirVolume()), withCtr(ctr1), withCtr(ctr2))
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -3668,7 +3696,12 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(Exit(0))
|
||||||
|
if IsRemote() {
|
||||||
|
Expect(kube.ErrorToString()).To(BeEmpty())
|
||||||
|
} else {
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring("Limiting replica count to 1, more than one replica is not supported by Podman"))
|
||||||
|
}
|
||||||
|
|
||||||
correctLabels := expectedLabelKey + ":" + expectedLabelValue
|
correctLabels := expectedLabelKey + ":" + expectedLabelValue
|
||||||
pod := getPodNameInDeployment(deployment)
|
pod := getPodNameInDeployment(deployment)
|
||||||
@ -3706,7 +3739,12 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(Exit(0))
|
||||||
|
if IsRemote() {
|
||||||
|
Expect(kube.ErrorToString()).To(BeEmpty())
|
||||||
|
} else {
|
||||||
|
Expect(kube.ErrorToString()).To(ContainSubstring("Limiting replica count to 1, more than one replica is not supported by Podman"))
|
||||||
|
}
|
||||||
|
|
||||||
pod := getPodNameInDeployment(deployment)
|
pod := getPodNameInDeployment(deployment)
|
||||||
inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(&pod), "--format", `
|
inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(&pod), "--format", `
|
||||||
@ -4445,7 +4483,7 @@ invalid kube kind
|
|||||||
ENV JAVA_TOOL_OPTIONS=%q
|
ENV JAVA_TOOL_OPTIONS=%q
|
||||||
ENV OPENJ9_JAVA_OPTIONS=%q
|
ENV OPENJ9_JAVA_OPTIONS=%q
|
||||||
`,
|
`,
|
||||||
ALPINE, javaToolOptions, openj9JavaOptions)
|
CITEST_IMAGE, javaToolOptions, openj9JavaOptions)
|
||||||
|
|
||||||
image := "podman-kube-test:env"
|
image := "podman-kube-test:env"
|
||||||
podmanTest.BuildImage(containerfile, image, "false")
|
podmanTest.BuildImage(containerfile, image, "false")
|
||||||
@ -4781,7 +4819,7 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||||||
cmd := exec.Command(podmanTest.PodmanBinary, "unshare", "cat", "/proc/self/uid_map")
|
cmd := exec.Command(podmanTest.PodmanBinary, "unshare", "cat", "/proc/self/uid_map")
|
||||||
session, err := Start(cmd, GinkgoWriter, GinkgoWriter)
|
session, err := Start(cmd, GinkgoWriter, GinkgoWriter)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Eventually(session, DefaultWaitTimeout).Should(ExitCleanly())
|
Eventually(session, DefaultWaitTimeout).Should(Exit(0))
|
||||||
initialUsernsConfig = session.Out.Contents()
|
initialUsernsConfig = session.Out.Contents()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4799,8 +4837,8 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||||||
// the conversion to string is needed for better error messages
|
// the conversion to string is needed for better error messages
|
||||||
Expect(string(usernsInCtr.Out.Contents())).To(Equal(string(initialUsernsConfig)))
|
Expect(string(usernsInCtr.Out.Contents())).To(Equal(string(initialUsernsConfig)))
|
||||||
|
|
||||||
// PodmanNoCache is a workaround for https://github.com/containers/storage/issues/1232
|
// -q necessary for ExitCleanly() because --replace pulls image
|
||||||
kube = podmanTest.PodmanNoCache([]string{"kube", "play", "--replace", "--userns=auto", kubeYaml})
|
kube = podmanTest.Podman([]string{"kube", "play", "-q", "--replace", "--userns=auto", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -4809,7 +4847,7 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||||||
Expect(usernsInCtr).Should(ExitCleanly())
|
Expect(usernsInCtr).Should(ExitCleanly())
|
||||||
Expect(string(usernsInCtr.Out.Contents())).To(Not(Equal(string(initialUsernsConfig))))
|
Expect(string(usernsInCtr.Out.Contents())).To(Not(Equal(string(initialUsernsConfig))))
|
||||||
|
|
||||||
kube = podmanTest.PodmanNoCache([]string{"kube", "play", "--replace", "--userns=keep-id", kubeYaml})
|
kube = podmanTest.PodmanNoCache([]string{"kube", "play", "-q", "--replace", "--userns=keep-id", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5062,7 +5100,7 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||||||
secretYaml, err := getKubeYaml("secret", secret)
|
secretYaml, err := getKubeYaml("secret", secret)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getSecretVolume(volumeName, []map[string]string{}, false)), withCtr(ctr))
|
pod := getPod(withVolume(getSecretVolume(volumeName, []map[string]string{}, false)), withCtr(ctr))
|
||||||
podYaml, err := getKubeYaml("pod", pod)
|
podYaml, err := getKubeYaml("pod", pod)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -5090,7 +5128,7 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||||||
"path": "BAR",
|
"path": "BAR",
|
||||||
}}
|
}}
|
||||||
|
|
||||||
ctr := getCtr(withVolumeMount("/test", "", false), withImage(BB))
|
ctr := getCtr(withVolumeMount("/test", "", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withVolume(getSecretVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
pod := getPod(withVolume(getSecretVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
||||||
podYaml, err := getKubeYaml("pod", pod)
|
podYaml, err := getKubeYaml("pod", pod)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -5201,7 +5239,7 @@ spec:
|
|||||||
volumeCreate.WaitWithDefaultTimeout()
|
volumeCreate.WaitWithDefaultTimeout()
|
||||||
Expect(volumeCreate).Should(ExitCleanly())
|
Expect(volumeCreate).Should(ExitCleanly())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "--volume", "testvol1:/data", ALPINE, "sh", "-c", "mkdir -p /data/testing/onlythis && touch /data/testing/onlythis/123.txt && echo hi >> /data/testing/onlythis/123.txt"})
|
session := podmanTest.Podman([]string{"run", "--volume", "testvol1:/data", CITEST_IMAGE, "sh", "-c", "mkdir -p /data/testing/onlythis && touch /data/testing/onlythis/123.txt && echo hi >> /data/testing/onlythis/123.txt"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5260,7 +5298,7 @@ spec:
|
|||||||
err = file.Close()
|
err = file.Close()
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
pod := getPod(withPodName("testpod"), withCtr(getCtr(withImage(ALPINE), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/var", "testing/onlythis", false))), withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
|
pod := getPod(withPodName("testpod"), withCtr(getCtr(withImage(CITEST_IMAGE), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/var", "testing/onlythis", false))), withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
|
||||||
|
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).To(Not(HaveOccurred()))
|
Expect(err).To(Not(HaveOccurred()))
|
||||||
@ -5279,7 +5317,7 @@ spec:
|
|||||||
volumeCreate.WaitWithDefaultTimeout()
|
volumeCreate.WaitWithDefaultTimeout()
|
||||||
Expect(volumeCreate).Should(ExitCleanly())
|
Expect(volumeCreate).Should(ExitCleanly())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "--volume", "testvol1:/data", ALPINE, "sh", "-c", "mkdir -p /data/testing && ln -s /etc /data/testing/onlythis"})
|
session := podmanTest.Podman([]string{"run", "--volume", "testvol1:/data", CITEST_IMAGE, "sh", "-c", "mkdir -p /data/testing && ln -s /etc /data/testing/onlythis"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5314,7 +5352,7 @@ spec:
|
|||||||
Expect(os.MkdirAll(filepath.Join(hostPathLocation, "testing"), 0755)).To(Succeed())
|
Expect(os.MkdirAll(filepath.Join(hostPathLocation, "testing"), 0755)).To(Succeed())
|
||||||
Expect(os.Symlink("/", filepath.Join(hostPathLocation, "testing", "symlink"))).To(Succeed())
|
Expect(os.Symlink("/", filepath.Join(hostPathLocation, "testing", "symlink"))).To(Succeed())
|
||||||
|
|
||||||
pod := getPod(withPodName("testpod"), withCtr(getCtr(withImage(ALPINE), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/foo", "testing/symlink", false))), withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
|
pod := getPod(withPodName("testpod"), withCtr(getCtr(withImage(CITEST_IMAGE), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/foo", "testing/symlink", false))), withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
|
||||||
|
|
||||||
err = generateKubeYaml("pod", pod, kubeYaml)
|
err = generateKubeYaml("pod", pod, kubeYaml)
|
||||||
Expect(err).To(Not(HaveOccurred()))
|
Expect(err).To(Not(HaveOccurred()))
|
||||||
@ -5335,7 +5373,7 @@ spec:
|
|||||||
"path": "BAR",
|
"path": "BAR",
|
||||||
}}
|
}}
|
||||||
|
|
||||||
ctr := getCtr(withPullPolicy("always"), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/etc/BAR", "BAR", false), withImage(ALPINE))
|
ctr := getCtr(withPullPolicy("always"), withName("testctr"), withCmd([]string{"top"}), withVolumeMount("/etc/BAR", "BAR", false), withImage(CITEST_IMAGE))
|
||||||
pod := getPod(withPodName("testpod"), withVolume(getConfigMapVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
pod := getPod(withPodName("testpod"), withVolume(getConfigMapVolume(volumeName, volumeContents, false)), withCtr(ctr))
|
||||||
|
|
||||||
podYaml, err := getKubeYaml("pod", pod)
|
podYaml, err := getKubeYaml("pod", pod)
|
||||||
@ -5471,7 +5509,7 @@ spec:
|
|||||||
|
|
||||||
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
|
||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(Exit(0))
|
||||||
|
|
||||||
// warnings are only propagated to local clients
|
// warnings are only propagated to local clients
|
||||||
if !IsRemote() {
|
if !IsRemote() {
|
||||||
@ -5490,12 +5528,12 @@ spec:
|
|||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-hostpid-alpine", "test-hostpid"})
|
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-hostpid-testimage", "test-hostpid"})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(ExitCleanly())
|
Expect(logs).Should(ExitCleanly())
|
||||||
Expect(logs.OutputToString()).To(Not(Equal("1")), "PID should never be 1 because of host pidns")
|
Expect(logs.OutputToString()).To(Not(Equal("1")), "PID should never be 1 because of host pidns")
|
||||||
|
|
||||||
inspect := podmanTest.Podman([]string{"inspect", "test-hostpid-alpine", "--format", "{{ .HostConfig.PidMode }}"})
|
inspect := podmanTest.Podman([]string{"inspect", "test-hostpid-testimage", "--format", "{{ .HostConfig.PidMode }}"})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
Expect(inspect).Should(ExitCleanly())
|
Expect(inspect).Should(ExitCleanly())
|
||||||
Expect(inspect.OutputToString()).To(Equal("host"))
|
Expect(inspect.OutputToString()).To(Equal("host"))
|
||||||
@ -5509,11 +5547,11 @@ spec:
|
|||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
wait := podmanTest.Podman([]string{"wait", "test-hostipc-alpine"})
|
wait := podmanTest.Podman([]string{"wait", "test-hostipc-testimage"})
|
||||||
wait.WaitWithDefaultTimeout()
|
wait.WaitWithDefaultTimeout()
|
||||||
Expect(wait).Should(ExitCleanly())
|
Expect(wait).Should(ExitCleanly())
|
||||||
|
|
||||||
inspect := podmanTest.Podman([]string{"inspect", "test-hostipc-alpine", "--format", "{{ .HostConfig.IpcMode }}"})
|
inspect := podmanTest.Podman([]string{"inspect", "test-hostipc-testimage", "--format", "{{ .HostConfig.IpcMode }}"})
|
||||||
inspect.WaitWithDefaultTimeout()
|
inspect.WaitWithDefaultTimeout()
|
||||||
Expect(inspect).Should(ExitCleanly())
|
Expect(inspect).Should(ExitCleanly())
|
||||||
Expect(inspect.OutputToString()).To(Equal("host"))
|
Expect(inspect.OutputToString()).To(Equal("host"))
|
||||||
@ -5524,7 +5562,7 @@ spec:
|
|||||||
fields := strings.Split(string(res), " ")
|
fields := strings.Split(string(res), " ")
|
||||||
hostIpcNS := strings.TrimSuffix(fields[len(fields)-1], "\n")
|
hostIpcNS := strings.TrimSuffix(fields[len(fields)-1], "\n")
|
||||||
|
|
||||||
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-hostipc-alpine", "test-hostipc"})
|
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-hostipc-testimage", "test-hostipc"})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(ExitCleanly())
|
Expect(logs).Should(ExitCleanly())
|
||||||
fields = strings.Split(logs.OutputToString(), " ")
|
fields = strings.Split(logs.OutputToString(), " ")
|
||||||
@ -5536,7 +5574,7 @@ spec:
|
|||||||
It("with ctrName should be in network alias", func() {
|
It("with ctrName should be in network alias", func() {
|
||||||
ctrName := "test-ctr"
|
ctrName := "test-ctr"
|
||||||
ctrNameInKubePod := ctrName + "-pod-" + ctrName
|
ctrNameInKubePod := ctrName + "-pod-" + ctrName
|
||||||
session1 := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, ALPINE, "top"})
|
session1 := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, CITEST_IMAGE, "top"})
|
||||||
session1.WaitWithDefaultTimeout()
|
session1.WaitWithDefaultTimeout()
|
||||||
Expect(session1).Should(ExitCleanly())
|
Expect(session1).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5568,11 +5606,11 @@ spec:
|
|||||||
kube.WaitWithDefaultTimeout()
|
kube.WaitWithDefaultTimeout()
|
||||||
Expect(kube).Should(ExitCleanly())
|
Expect(kube).Should(ExitCleanly())
|
||||||
|
|
||||||
wait := podmanTest.Podman([]string{"wait", "test-sysctl-alpine"})
|
wait := podmanTest.Podman([]string{"wait", "test-sysctl-testimage"})
|
||||||
wait.WaitWithDefaultTimeout()
|
wait.WaitWithDefaultTimeout()
|
||||||
Expect(wait).Should(ExitCleanly())
|
Expect(wait).Should(ExitCleanly())
|
||||||
|
|
||||||
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-sysctl-alpine", "test-sysctl"})
|
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-sysctl-testimage", "test-sysctl"})
|
||||||
logs.WaitWithDefaultTimeout()
|
logs.WaitWithDefaultTimeout()
|
||||||
Expect(logs).Should(ExitCleanly())
|
Expect(logs).Should(ExitCleanly())
|
||||||
Expect(logs.OutputToString()).To(ContainSubstring("kernel.msgmax = 65535"))
|
Expect(logs.OutputToString()).To(ContainSubstring("kernel.msgmax = 65535"))
|
||||||
@ -5596,7 +5634,7 @@ spec:
|
|||||||
err := os.MkdirAll(vol1, 0755)
|
err := os.MkdirAll(vol1, 0755)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "-v", vol1 + ":/tmp/foo:Z", "--name", ctrName, ALPINE})
|
session := podmanTest.Podman([]string{"run", "-v", vol1 + ":/tmp/foo:Z", "--name", ctrName, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5616,7 +5654,7 @@ spec:
|
|||||||
err := os.MkdirAll(vol1, 0755)
|
err := os.MkdirAll(vol1, 0755)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "-v", vol1 + ":/tmp/foo:Z", "--name", ctrName, ALPINE})
|
session := podmanTest.Podman([]string{"run", "-v", vol1 + ":/tmp/foo:Z", "--name", ctrName, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5640,11 +5678,11 @@ spec:
|
|||||||
err := os.MkdirAll(vol1, 0755)
|
err := os.MkdirAll(vol1, 0755)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--name", ctr1, "-v", vol1, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--name", ctr1, "-v", vol1, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"create", "--volumes-from", ctr1, "--name", ctr2, ALPINE})
|
session = podmanTest.Podman([]string{"create", "--volumes-from", ctr1, "--name", ctr2, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5673,7 +5711,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--rm", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--rm", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5696,7 +5734,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--privileged", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--privileged", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5719,7 +5757,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--init", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--init", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5743,7 +5781,7 @@ spec:
|
|||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
cidFile := filepath.Join(podmanTest.TempDir, RandomString(10)+".txt")
|
cidFile := filepath.Join(podmanTest.TempDir, RandomString(10)+".txt")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--cidfile", cidFile, "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--cidfile", cidFile, "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5767,7 +5805,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--security-opt", "seccomp=unconfined", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--security-opt", "seccomp=unconfined", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5790,7 +5828,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--security-opt", "apparmor=unconfined", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--security-opt", "apparmor=unconfined", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5813,7 +5851,7 @@ spec:
|
|||||||
ctrNameInKubePod := ctr + "-pod-" + ctr
|
ctrNameInKubePod := ctr + "-pod-" + ctr
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "--security-opt", "label=level:s0", "--name", ctr, ALPINE})
|
session := podmanTest.Podman([]string{"create", "--security-opt", "label=level:s0", "--name", ctr, CITEST_IMAGE})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5832,11 +5870,11 @@ spec:
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("test with reserved PublishAll annotation in yaml", func() {
|
It("test with reserved PublishAll annotation in yaml", func() {
|
||||||
podmanTest.AddImageToRWStore(ALPINE)
|
podmanTest.AddImageToRWStore(CITEST_IMAGE)
|
||||||
dockerfile := fmt.Sprintf(`FROM %s
|
dockerfile := fmt.Sprintf(`FROM %s
|
||||||
EXPOSE 2002
|
EXPOSE 2002
|
||||||
EXPOSE 2001-2003
|
EXPOSE 2001-2003
|
||||||
EXPOSE 2004-2005/tcp`, ALPINE)
|
EXPOSE 2004-2005/tcp`, CITEST_IMAGE)
|
||||||
imageName := "testimg"
|
imageName := "testimg"
|
||||||
podmanTest.BuildImage(dockerfile, imageName, "false")
|
podmanTest.BuildImage(dockerfile, imageName, "false")
|
||||||
|
|
||||||
@ -5878,7 +5916,7 @@ EXPOSE 2004-2005/tcp`, ALPINE)
|
|||||||
ctrNameInPod := "ctr-pod-ctr"
|
ctrNameInPod := "ctr-pod-ctr"
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
create := podmanTest.Podman([]string{"create", "-t", "--restart", "never", "--name", ctrName, ALPINE})
|
create := podmanTest.Podman([]string{"create", "-t", "--restart", "never", "--name", ctrName, CITEST_IMAGE, "top"})
|
||||||
create.WaitWithDefaultTimeout()
|
create.WaitWithDefaultTimeout()
|
||||||
Expect(create).Should(ExitCleanly())
|
Expect(create).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5910,7 +5948,7 @@ EXPOSE 2004-2005/tcp`, ALPINE)
|
|||||||
pod.WaitWithDefaultTimeout()
|
pod.WaitWithDefaultTimeout()
|
||||||
Expect(pod).Should(ExitCleanly())
|
Expect(pod).Should(ExitCleanly())
|
||||||
|
|
||||||
ctr := podmanTest.Podman([]string{"create", "--pod", podName, ALPINE, "top"})
|
ctr := podmanTest.Podman([]string{"create", "--pod", podName, CITEST_IMAGE, "top"})
|
||||||
ctr.WaitWithDefaultTimeout()
|
ctr.WaitWithDefaultTimeout()
|
||||||
Expect(ctr).Should(ExitCleanly())
|
Expect(ctr).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5945,7 +5983,7 @@ EXPOSE 2004-2005/tcp`, ALPINE)
|
|||||||
pod.WaitWithDefaultTimeout()
|
pod.WaitWithDefaultTimeout()
|
||||||
Expect(pod).Should(ExitCleanly())
|
Expect(pod).Should(ExitCleanly())
|
||||||
|
|
||||||
ctr := podmanTest.Podman([]string{"create", "--pod", podName, ALPINE, "top"})
|
ctr := podmanTest.Podman([]string{"create", "--pod", podName, CITEST_IMAGE, "top"})
|
||||||
ctr.WaitWithDefaultTimeout()
|
ctr.WaitWithDefaultTimeout()
|
||||||
Expect(ctr).Should(ExitCleanly())
|
Expect(ctr).Should(ExitCleanly())
|
||||||
|
|
||||||
@ -5997,7 +6035,7 @@ EXPOSE 2004-2005/tcp`, ALPINE)
|
|||||||
ctrNameInPod := "ctr-pod-ctr"
|
ctrNameInPod := "ctr-pod-ctr"
|
||||||
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
outputFile := filepath.Join(podmanTest.TempDir, "pod.yaml")
|
||||||
|
|
||||||
create := podmanTest.Podman([]string{"create", "--restart", "never", "--stop-timeout", "20", "--name", ctrName, ALPINE})
|
create := podmanTest.Podman([]string{"create", "--restart", "never", "--stop-timeout", "20", "--name", ctrName, CITEST_IMAGE})
|
||||||
create.WaitWithDefaultTimeout()
|
create.WaitWithDefaultTimeout()
|
||||||
Expect(create).Should(ExitCleanly())
|
Expect(create).Should(ExitCleanly())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user