aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-25 12:32:08 +0200
committerGitHub <noreply@github.com>2019-05-25 12:32:08 +0200
commitb1d590b4412fa7508390c8733c549049d6d3a75b (patch)
tree878e704e129d29e4c869717a97abde3ef5891e56 /test
parent3c85122faa8f5697d41cb704c76468349cf97cb8 (diff)
parent5eb321ac372f5c29f65769a4554ff224186ffb21 (diff)
downloadpodman-b1d590b4412fa7508390c8733c549049d6d3a75b.tar.gz
podman-b1d590b4412fa7508390c8733c549049d6d3a75b.tar.bz2
podman-b1d590b4412fa7508390c8733c549049d6d3a75b.zip
Merge pull request #3196 from giuseppe/keep-id
userns: add new option --userns=keep-id
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_userns_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index f7f0e1c9a..ce6971cd1 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -3,6 +3,7 @@
package integration
import (
+ "fmt"
"os"
. "github.com/containers/libpod/test/utils"
@@ -76,4 +77,12 @@ var _ = Describe("Podman UserNS support", func() {
Expect(ok).To(BeTrue())
})
+ It("podman --userns=keep-id", func() {
+ session := podmanTest.Podman([]string{"run", "--userns=keep-id", "alpine", "id", "-u"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ uid := fmt.Sprintf("%d", os.Geteuid())
+ ok, _ := session.GrepString(uid)
+ Expect(ok).To(BeTrue())
+ })
})