From 2da86bdc3a626f3aebaadbf28c5cc73f80995a78 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 29 Jul 2019 16:44:09 -0400 Subject: 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 --- test/e2e/run_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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)) -- cgit v1.2.3-54-g00ecf