From c385e6d36334342195203e5bd368f772992911d1 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 17 Jun 2020 14:53:04 -0400 Subject: Don't ignore --user flag in rootless --userns keepid Currently podman run --userns keep-id --user root:root fedora id The --user flag is ignored. Removing this makes the code work correctly. Signed-off-by: Daniel J Walsh --- test/e2e/run_userns_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/e2e') diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go index 25f12ec2e..5b9a99daa 100644 --- a/test/e2e/run_userns_test.go +++ b/test/e2e/run_userns_test.go @@ -89,6 +89,13 @@ var _ = Describe("Podman UserNS support", func() { Expect(ok).To(BeTrue()) }) + It("podman --userns=keep-id --user root:root", func() { + session := podmanTest.Podman([]string{"run", "--userns=keep-id", "--user", "root:root", "alpine", "id", "-u"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(Equal("0")) + }) + It("podman --userns=auto", func() { u, err := user.Current() Expect(err).To(BeNil()) -- cgit v1.2.3-54-g00ecf