aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-15 05:09:40 -0400
committerGitHub <noreply@github.com>2020-10-15 05:09:40 -0400
commit41eda417fe4565cab26d704daedca0d285327f31 (patch)
tree1081e38cfce5486b6b81f27ed1b1c4db003ec93d /test
parente4f6a1afae1f28b9d7509a2a1b3e8180decbbb57 (diff)
parent6ca80679561285859a00c1b6bf1fae2d071d7cc3 (diff)
downloadpodman-41eda417fe4565cab26d704daedca0d285327f31.tar.gz
podman-41eda417fe4565cab26d704daedca0d285327f31.tar.bz2
podman-41eda417fe4565cab26d704daedca0d285327f31.zip
Merge pull request #8013 from rhatdan/homedir
Setup HOME environment when using --userns=keep-id
Diffstat (limited to 'test')
-rw-r--r--test/e2e/toolbox_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go
index 6122cee19..4f4113bd4 100644
--- a/test/e2e/toolbox_test.go
+++ b/test/e2e/toolbox_test.go
@@ -365,4 +365,16 @@ var _ = Describe("Toolbox-specific testing", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("READY"))
})
+
+ It("podman run --userns=keep-id check $HOME", func() {
+ var session *PodmanSessionIntegration
+
+ currentUser, err := user.Current()
+ Expect(err).To(BeNil())
+ session = podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:%s", currentUser.HomeDir, currentUser.HomeDir), "--userns=keep-id", fedoraToolbox, "sh", "-c", "echo $HOME"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(currentUser.HomeDir))
+ })
+
})