summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-14 12:51:06 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-15 00:20:47 +0000
commitbe9ed1cfacc19d1ad3c09e10481da445615b8b8e (patch)
tree1c0c01daf5b43c6139e37408be601475c1dcea41 /test/e2e
parentd051dc38d81920c94c37b20ceba0d33b35299bca (diff)
downloadpodman-be9ed1cfacc19d1ad3c09e10481da445615b8b8e.tar.gz
podman-be9ed1cfacc19d1ad3c09e10481da445615b8b8e.tar.bz2
podman-be9ed1cfacc19d1ad3c09e10481da445615b8b8e.zip
Privileged containers should inherit host devices
When running a privileged container, it should inherit the same devices the host has. Signed-off-by: baude <bbaude@redhat.com> Closes: #330 Approved by: mheon
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_privileged_test.go (renamed from test/e2e/privileged_test.go)13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/privileged_test.go b/test/e2e/run_privileged_test.go
index b660e1b55..b53be15f0 100644
--- a/test/e2e/privileged_test.go
+++ b/test/e2e/run_privileged_test.go
@@ -73,4 +73,17 @@ var _ = Describe("Podman privileged container tests", func() {
Expect(capAmp[1]).To(Equal(capEff[1]))
})
+ It("podman non-privileged should have very few devices", func() {
+ session := podmanTest.Podman([]string{"run", "busybox", "ls", "-l", "/dev"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(18))
+ })
+
+ It("podman privileged should inherit host devices", func() {
+ session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "ls", "-l", "/dev"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 20))
+ })
})