summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-21 10:15:32 +0200
committerGitHub <noreply@github.com>2019-09-21 10:15:32 +0200
commit819b63c8de310d37a8658ee70fa3b825162a3e17 (patch)
tree7a579c4d3e8dea620ee63457cc453b3cf373baf6 /test
parent66f4bc76384cca8716f9192aa279138cb2b35812 (diff)
parente42e1c45ae761b203dd5312c22ee7992eef322dc (diff)
downloadpodman-819b63c8de310d37a8658ee70fa3b825162a3e17.tar.gz
podman-819b63c8de310d37a8658ee70fa3b825162a3e17.tar.bz2
podman-819b63c8de310d37a8658ee70fa3b825162a3e17.zip
Merge pull request #4068 from giuseppe/always-set-home
container: make sure $HOME is always set
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 4d2cee8e3..55920467c 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -194,10 +194,22 @@ var _ = Describe("Podman run", func() {
})
It("podman run environment test", func() {
- session := podmanTest.Podman([]string{"run", "--rm", "--env", "FOO=BAR,BAZ", ALPINE, "printenv", "FOO"})
+ session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "HOME"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- match, _ := session.GrepString("BAR,BAZ")
+ match, _ := session.GrepString("/root")
+ Expect(match).Should(BeTrue())
+
+ session = podmanTest.Podman([]string{"run", "--rm", "--env", "HOME=/foo", ALPINE, "printenv", "HOME"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ = session.GrepString("/foo")
+ Expect(match).Should(BeTrue())
+
+ session = podmanTest.Podman([]string{"run", "--rm", "--env", "FOO=BAR,BAZ", ALPINE, "printenv", "FOO"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ = session.GrepString("BAR,BAZ")
Expect(match).Should(BeTrue())
session = podmanTest.Podman([]string{"run", "--rm", "--env", "PATH=/bin", ALPINE, "printenv", "PATH"})