summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-09-04 13:19:19 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-09-04 13:19:19 -0400
commit5f1550157842c4e93f728efbc12720d87790c26f (patch)
tree038dd5db5e15de2b58c1b3c02ffa3f08cf67df12
parentc13a52cfdebf57028f014f24ccd889d6b5acd643 (diff)
downloadpodman-5f1550157842c4e93f728efbc12720d87790c26f.tar.gz
podman-5f1550157842c4e93f728efbc12720d87790c26f.tar.bz2
podman-5f1550157842c4e93f728efbc12720d87790c26f.zip
Add test to verify noexec works with volume mounts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
-rw-r--r--test/e2e/run_volume_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 0441dad1c..5bad6744b 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -184,4 +184,10 @@ var _ = Describe("Podman run with volumes", func() {
Expect(matches[0]).To(Not(ContainSubstring("nodev")))
Expect(matches[0]).To(Not(ContainSubstring("nosuid")))
})
+
+ It("podman run with noexec can't exec", func() {
+ session := podmanTest.Podman([]string{"run", "--rm", "-v", "/bin:/hostbin:noexec", ALPINE, "/hostbin/ls", "/"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
})