summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-08-26 09:56:03 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-08-28 14:28:52 -0400
commitc13a52cfdebf57028f014f24ccd889d6b5acd643 (patch)
tree1027a7248e2e3be99f48679c02349759e0e1315d /test/e2e
parent96812dc490dbd00b0ec6280353a4e78ba79b44b8 (diff)
downloadpodman-c13a52cfdebf57028f014f24ccd889d6b5acd643.tar.gz
podman-c13a52cfdebf57028f014f24ccd889d6b5acd643.tar.bz2
podman-c13a52cfdebf57028f014f24ccd889d6b5acd643.zip
Add a test for the new suid/exec/dev options
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_volume_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index abb93a149..0441dad1c 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -162,4 +162,26 @@ var _ = Describe("Podman run with volumes", func() {
Expect(session.OutputToString()).To(ContainSubstring("/testvol1"))
Expect(session.OutputToString()).To(ContainSubstring("/testvol2"))
})
+
+ It("podman run with volumes and suid/dev/exec options", func() {
+ mountPath := filepath.Join(podmanTest.TempDir, "secrets")
+ os.Mkdir(mountPath, 0755)
+ session := podmanTest.Podman([]string{"run", "--rm", "-v", fmt.Sprintf("%s:/run/test:suid,dev,exec", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ found, matches := session.GrepString("/run/test")
+ Expect(found).Should(BeTrue())
+ Expect(matches[0]).To(Not(ContainSubstring("noexec")))
+ Expect(matches[0]).To(Not(ContainSubstring("nodev")))
+ Expect(matches[0]).To(Not(ContainSubstring("nosuid")))
+
+ session = podmanTest.Podman([]string{"run", "--rm", "--tmpfs", "/run/test:suid,dev,exec", ALPINE, "grep", "/run/test", "/proc/self/mountinfo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ found, matches = session.GrepString("/run/test")
+ Expect(found).Should(BeTrue())
+ Expect(matches[0]).To(Not(ContainSubstring("noexec")))
+ Expect(matches[0]).To(Not(ContainSubstring("nodev")))
+ Expect(matches[0]).To(Not(ContainSubstring("nosuid")))
+ })
})