summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/common_test.go5
-rw-r--r--test/e2e/run_userns_test.go15
2 files changed, 15 insertions, 5 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index ef1c85518..7e14f9e06 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -214,11 +214,6 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration {
cgroupManager = os.Getenv("CGROUP_MANAGER")
}
- // Ubuntu doesn't use systemd cgroups
- if host.Distribution == "ubuntu" {
- cgroupManager = "cgroupfs"
- }
-
ociRuntime := os.Getenv("OCI_RUNTIME")
if ociRuntime == "" {
var err error
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index be3f7df49..e873f5abe 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -85,4 +85,19 @@ var _ = Describe("Podman UserNS support", func() {
ok, _ := session.GrepString(uid)
Expect(ok).To(BeTrue())
})
+
+ It("podman --userns=container:CTR", func() {
+ ctrName := "userns-ctr"
+ session := podmanTest.Podman([]string{"run", "-d", "--uidmap=0:0:1", "--uidmap=1:1:4998", "--name", ctrName, "alpine", "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ // runc has an issue and we also need to join the IPC namespace.
+ session = podmanTest.Podman([]string{"run", "--rm", "--userns=container:" + ctrName, "--ipc=container:" + ctrName, "alpine", "cat", "/proc/self/uid_map"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ ok, _ := session.GrepString("4998")
+ Expect(ok).To(BeTrue())
+ })
})