summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-07 19:23:27 +0200
committerGitHub <noreply@github.com>2020-07-07 19:23:27 +0200
commit54d16f3b5fc4210c7c46e4cca240f988fa5f39f5 (patch)
tree5cd32e61758c7c43ed44b2529cafc8281b46a910 /test
parentcd084853b6187d8b236ea327818277cc02e0b916 (diff)
parent6c6670f12a3e6b91c1ebb09e7d9e4f49f89dccc0 (diff)
downloadpodman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.tar.gz
podman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.tar.bz2
podman-54d16f3b5fc4210c7c46e4cca240f988fa5f39f5.zip
Merge pull request #6829 from rhatdan/keepid
Add username to /etc/passwd inside of container if --userns keep-id
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_userns_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index 9f0466468..42f13537d 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -89,6 +89,16 @@ var _ = Describe("Podman UserNS support", func() {
Expect(ok).To(BeTrue())
})
+ It("podman --userns=keep-id check passwd", func() {
+ session := podmanTest.Podman([]string{"run", "--userns=keep-id", "alpine", "id", "-un"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ u, err := user.Current()
+ Expect(err).To(BeNil())
+ ok, _ := session.GrepString(u.Name)
+ Expect(ok).To(BeTrue())
+ })
+
It("podman --userns=keep-id root owns /usr", func() {
session := podmanTest.Podman([]string{"run", "--userns=keep-id", "alpine", "stat", "-c%u", "/usr"})
session.WaitWithDefaultTimeout()