aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-07-29 16:44:09 -0400
committerQi Wang <qiwan@redhat.com>2019-07-30 12:02:18 -0400
commit2da86bdc3a626f3aebaadbf28c5cc73f80995a78 (patch)
treef3a2b7b54fd52f3649d07f5b7aabddc0ae2f3780 /test/e2e
parentc3c45f3ba5c2782be9658a33f8632467a06c6422 (diff)
downloadpodman-2da86bdc3a626f3aebaadbf28c5cc73f80995a78.tar.gz
podman-2da86bdc3a626f3aebaadbf28c5cc73f80995a78.tar.bz2
podman-2da86bdc3a626f3aebaadbf28c5cc73f80995a78.zip
Set -env variables as appropriate
close #3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index e35c84f5b..7b5ff2547 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -213,6 +213,11 @@ var _ = Describe("Podman run", func() {
Expect(match).Should(BeTrue())
os.Unsetenv("FOO")
+ session = podmanTest.Podman([]string{"run", "--rm", "--env", "FOO", ALPINE, "printenv", "FOO"})
+ session.WaitWithDefaultTimeout()
+ Expect(len(session.OutputToString())).To(Equal(0))
+ Expect(session.ExitCode()).To(Equal(1))
+
session = podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))