summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-24 09:14:42 -0400
committerGitHub <noreply@github.com>2022-08-24 09:14:42 -0400
commit67c4068bb35fd1aad95b1701c94ed11183d0fd66 (patch)
tree19f9cc0bbbdd593cbb099c260bf6e395cd80d715 /test/e2e
parent1bcceadca4850e8efd975d927a5586ad052207ac (diff)
parentb4584ea8546be227c74174130ec3a04a93996d28 (diff)
downloadpodman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.tar.gz
podman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.tar.bz2
podman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.zip
Merge pull request #15443 from flouthoc/env-merge-support
run,create: add support for `--env-merge` for preprocessing default environment variables
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_env_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/run_env_test.go b/test/e2e/run_env_test.go
index bab52efc5..9e78e150a 100644
--- a/test/e2e/run_env_test.go
+++ b/test/e2e/run_env_test.go
@@ -82,6 +82,17 @@ var _ = Describe("Podman run", func() {
Expect(session.OutputToString()).To(ContainSubstring("HOSTNAME"))
})
+ It("podman run with --env-merge", func() {
+ dockerfile := `FROM quay.io/libpod/alpine:latest
+ENV hello=world
+`
+ podmanTest.BuildImage(dockerfile, "test", "false")
+ session := podmanTest.Podman([]string{"run", "--rm", "--env-merge", "hello=${hello}-earth", "test", "env"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).To(ContainSubstring("world-earth"))
+ })
+
It("podman run --env-host environment test", func() {
env := append(os.Environ(), "FOO=BAR")
session := podmanTest.PodmanAsUser([]string{"run", "--rm", "--env-host", ALPINE, "/bin/printenv", "FOO"}, 0, 0, "", env)