summaryrefslogtreecommitdiff
path: root/test/e2e/run_userns_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-06-24 11:25:47 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-06-24 11:26:49 +0200
commit370195cf784967014dceee1f3da06f79170f033a (patch)
tree3c8e005c8be7232efd9900282833070bc7b63db9 /test/e2e/run_userns_test.go
parent5fe122bf528a0665f7d12bc47357779b8686f6cf (diff)
downloadpodman-370195cf784967014dceee1f3da06f79170f033a.tar.gz
podman-370195cf784967014dceee1f3da06f79170f033a.tar.bz2
podman-370195cf784967014dceee1f3da06f79170f033a.zip
libpod: specify mappings to the storage
specify the mappings in the container configuration to the storage when creating the container so that the correct mappings can be configured. Regression introduced with Podman 2.0. Closes: https://github.com/containers/libpod/issues/6735 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/run_userns_test.go')
-rw-r--r--test/e2e/run_userns_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index 5b9a99daa..be0981408 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 root owns /usr", func() {
+ session := podmanTest.Podman([]string{"run", "--userns=keep-id", "alpine", "stat", "-c%u", "/usr"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal("0"))
+ })
+
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()