summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-01-04 11:15:28 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-01-04 14:19:58 +0100
commit898f57c4c1c2abf14bc9fb000653b1e6634c10bf (patch)
treedfa87d8eb08e58093ac22246a0862901970363ce /test/e2e
parent23f25b8261cf2c0d83f8ce5b8251951a11a7e2c4 (diff)
downloadpodman-898f57c4c1c2abf14bc9fb000653b1e6634c10bf.tar.gz
podman-898f57c4c1c2abf14bc9fb000653b1e6634c10bf.tar.bz2
podman-898f57c4c1c2abf14bc9fb000653b1e6634c10bf.zip
systemd: make rundir always accessible
so that the PIDFile can be accessed also without being in the rootless user namespace. Closes: https://github.com/containers/podman/issues/8506 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/systemd_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index 48294943b..ce2a718df 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -131,6 +131,21 @@ WantedBy=multi-user.target
Expect(conData[0].Config.SystemdMode).To(BeTrue())
})
+ It("podman create container with --uidmap and conmon PidFile accessible", func() {
+ ctrName := "testCtrUidMap"
+ run := podmanTest.Podman([]string{"run", "-d", "--uidmap=0:1:1000", "--name", ctrName, ALPINE, "top"})
+ run.WaitWithDefaultTimeout()
+ Expect(run.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"inspect", "--format", "{{.ConmonPidFile}}", ctrName})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ pidFile := strings.TrimSuffix(session.OutputToString(), "\n")
+ _, err := ioutil.ReadFile(pidFile)
+ Expect(err).To(BeNil())
+ })
+
It("podman create container with systemd=always triggers systemd mode", func() {
ctrName := "testCtr"
run := podmanTest.Podman([]string{"create", "--name", ctrName, "--systemd", "always", ALPINE})