summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-21 17:57:24 +0000
committerGitHub <noreply@github.com>2022-06-21 17:57:24 +0000
commitfe974101ebc30d7902d29daa2e7832e61041f46e (patch)
tree3736a7b2920d2d0abff3393268dc9d556f2a06a7 /test
parentb8b0fa80454fe0f3bcdab24bbf17cf0b6c2e8661 (diff)
parentf451b68dfa71d3690d49bc0cf3536b77cd6572d0 (diff)
downloadpodman-fe974101ebc30d7902d29daa2e7832e61041f46e.tar.gz
podman-fe974101ebc30d7902d29daa2e7832e61041f46e.tar.bz2
podman-fe974101ebc30d7902d29daa2e7832e61041f46e.zip
Merge pull request #14625 from cdoern/podShm
podman pod create --shm-size
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_clone_test.go17
-rw-r--r--test/e2e/pod_create_test.go23
2 files changed, 40 insertions, 0 deletions
diff --git a/test/e2e/pod_clone_test.go b/test/e2e/pod_clone_test.go
index b62e1205c..b90bf10da 100644
--- a/test/e2e/pod_clone_test.go
+++ b/test/e2e/pod_clone_test.go
@@ -138,4 +138,21 @@ var _ = Describe("Podman pod clone", func() {
Expect(data.Mounts[0]).To(HaveField("Name", volName))
})
+ It("podman pod clone --shm-size", func() {
+ podCreate := podmanTest.Podman([]string{"pod", "create"})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate).Should(Exit(0))
+
+ podClone := podmanTest.Podman([]string{"pod", "clone", "--shm-size", "10mb", podCreate.OutputToString()})
+ podClone.WaitWithDefaultTimeout()
+ Expect(podClone).Should(Exit(0))
+
+ run := podmanTest.Podman([]string{"run", "-it", "--pod", podClone.OutputToString(), ALPINE, "mount"})
+ run.WaitWithDefaultTimeout()
+ Expect(run).Should(Exit(0))
+ t, strings := run.GrepString("shm on /dev/shm type tmpfs")
+ Expect(t).To(BeTrue())
+ Expect(strings[0]).Should(ContainSubstring("size=10240k"))
+ })
+
})
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 4919cc670..a48193e90 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -1134,4 +1134,27 @@ ENTRYPOINT ["sleep","99999"]
Expect(session.OutputToString()).Should(ContainSubstring("/vol2"))
})
+ It("podman pod create --shm-size", func() {
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--shm-size", "10mb"})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate).Should(Exit(0))
+
+ run := podmanTest.Podman([]string{"run", "-it", "--pod", podCreate.OutputToString(), ALPINE, "mount"})
+ run.WaitWithDefaultTimeout()
+ Expect(run).Should(Exit(0))
+ t, strings := run.GrepString("shm on /dev/shm type tmpfs")
+ Expect(t).To(BeTrue())
+ Expect(strings[0]).Should(ContainSubstring("size=10240k"))
+ })
+
+ It("podman pod create --shm-size and --ipc=host conflict", func() {
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--shm-size", "10mb"})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate).Should(Exit(0))
+
+ run := podmanTest.Podman([]string{"run", "-dt", "--pod", podCreate.OutputToString(), "--ipc", "host", ALPINE})
+ run.WaitWithDefaultTimeout()
+ Expect(run).ShouldNot(Exit(0))
+ })
+
})