summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-26 16:21:40 +0200
committerGitHub <noreply@github.com>2022-07-26 16:21:40 +0200
commit7f0fab10d1c43a7605da9c47900e0ae7a2120c11 (patch)
tree56723e57c6de54cfdd118d55937eeebf8a158a24 /test
parenta298909decc9091da8cc134e6eb2f38a70635a30 (diff)
parent27679d80b897b80c10553db0e2048a19ca17737d (diff)
downloadpodman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.tar.gz
podman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.tar.bz2
podman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.zip
Merge pull request #15059 from cdoern/infra
pod create --share none should not create infra
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_infra_container_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go
index a2e090524..b53630156 100644
--- a/test/e2e/pod_infra_container_test.go
+++ b/test/e2e/pod_infra_container_test.go
@@ -435,4 +435,20 @@ var _ = Describe("Podman pod create", func() {
Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(ContainSubstring(hostname))
})
+
+ tests := []string{"", "none"}
+ for _, test := range tests {
+ test := test
+ It("podman pod create --share="+test+" should not create an infra ctr", func() {
+ session := podmanTest.Podman([]string{"pod", "create", "--share", test})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"pod", "inspect", "--format", "{{.NumContainers}}", session.OutputToString()})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).Should((Equal("0")))
+ })
+ }
+
})