summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-06-23 11:20:30 -0400
committerMatthew Heon <mheon@redhat.com>2020-06-23 12:46:32 -0400
commit039eaccb5b27cedf39a0b8b84697300bf53a6335 (patch)
tree510c618f171d582e0cd9c6fdce3137e37fab4a9e /test/e2e/run_test.go
parent73514b1465fe2f79b82d017cdb11d587d6f7df3d (diff)
downloadpodman-039eaccb5b27cedf39a0b8b84697300bf53a6335.tar.gz
podman-039eaccb5b27cedf39a0b8b84697300bf53a6335.tar.bz2
podman-039eaccb5b27cedf39a0b8b84697300bf53a6335.zip
Add tests for --privileged with other flags
With Podman v2.0, we broke (or thought we were going to break) using `--privileged` with `--group-add` and `--security-opt` (specifically using `--security-opt` for SELinux config). Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 90179964d..42754bab4 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1039,4 +1039,12 @@ USER mail`
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
+
+ It("podman run --privileged and --group-add", func() {
+ groupName := "kvm"
+ session := podmanTest.Podman([]string{"run", "-t", "-i", "--group-add", groupName, "--privileged", fedoraMinimal, "groups"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(strings.Contains(session.OutputToString(), groupName)).To(BeTrue())
+ })
})