diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-08-31 08:37:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 08:37:34 -0400 |
commit | 9b4dac4c4d683619f9015c19c317fcd68b80dcf8 (patch) | |
tree | 86ca0b08e269785a28b232791305362f2fc4e0bf /test | |
parent | 7503c5544d506826e2d8602d95433eef98208e83 (diff) | |
parent | 8637548a3676f29746ca1cce346b09a228c649ae (diff) | |
download | podman-9b4dac4c4d683619f9015c19c317fcd68b80dcf8.tar.gz podman-9b4dac4c4d683619f9015c19c317fcd68b80dcf8.tar.bz2 podman-9b4dac4c4d683619f9015c19c317fcd68b80dcf8.zip |
Merge pull request #15389 from giuseppe/userns-map-user
podman: add uid and gid options to keep-id
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_userns_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go index 62e512d3a..016f67bf6 100644 --- a/test/e2e/run_userns_test.go +++ b/test/e2e/run_userns_test.go @@ -113,6 +113,16 @@ var _ = Describe("Podman UserNS support", func() { Expect(session).Should(Exit(0)) uid := fmt.Sprintf("%d", os.Geteuid()) Expect(session.OutputToString()).To(ContainSubstring(uid)) + + session = podmanTest.Podman([]string{"run", "--userns=keep-id:uid=10,gid=12", "alpine", "sh", "-c", "echo $(id -u):$(id -g)"}) + session.WaitWithDefaultTimeout() + if os.Geteuid() == 0 { + Expect(session).Should(Exit(125)) + return + } + + Expect(session).Should(Exit(0)) + Expect(session.OutputToString()).To(ContainSubstring("10:12")) }) It("podman --userns=keep-id check passwd", func() { |