summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-19 13:48:15 +0200
committerGitHub <noreply@github.com>2019-08-19 13:48:15 +0200
commitbefaa95d93481eef0d75d3babce7c6c643ecf85f (patch)
tree9a5e0b4d46846dc885a3ea3f27ccd2b3c9affd1e /test
parent98dee275d04dafa087db12bc3f0593a078039cfb (diff)
parent316e51f0a91d24f75a9191e2226928bc0c1c5b91 (diff)
downloadpodman-befaa95d93481eef0d75d3babce7c6c643ecf85f.tar.gz
podman-befaa95d93481eef0d75d3babce7c6c643ecf85f.tar.bz2
podman-befaa95d93481eef0d75d3babce7c6c643ecf85f.zip
Merge pull request #3777 from rhatdan/vendor
Add support & documentation to run containers with different file types
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_selinux_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go
index a2228411e..dfe71531a 100644
--- a/test/e2e/run_selinux_test.go
+++ b/test/e2e/run_selinux_test.go
@@ -153,4 +153,16 @@ var _ = Describe("Podman run", func() {
Expect(match).Should(BeTrue())
})
+ It("podman run selinux file type setup test", func() {
+ session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:container_var_lib_t", fedoraMinimal, "ls", "-Z", "/dev"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString("container_var_lib_t")
+ Expect(match).Should(BeTrue())
+
+ session = podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:foobar", fedoraMinimal, "ls", "-Z", "/dev"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(127))
+ })
+
})