diff options
author | Charlie Doern <cdoern@redhat.com> | 2022-08-22 14:25:10 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-09-06 14:05:37 -0400 |
commit | 9d8c17ec08f472e1685a77abcbfce2fa5032ee7c (patch) | |
tree | 27f3a4971f15a7d4bf92936f998574d178790a71 /test/e2e | |
parent | 0ab8ebd1a8cd7a9bb458c7573030fa7c19f5406c (diff) | |
download | podman-9d8c17ec08f472e1685a77abcbfce2fa5032ee7c.tar.gz podman-9d8c17ec08f472e1685a77abcbfce2fa5032ee7c.tar.bz2 podman-9d8c17ec08f472e1685a77abcbfce2fa5032ee7c.zip |
pass environment variables to container clone
the env vars are held in the spec rather than the config, so they need to be mapped manually. They are also of a different format so special handling needed to be added. All env from the parent container will now be passed to the clone.
resolves #15242
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/container_clone_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/container_clone_test.go b/test/e2e/container_clone_test.go index 94ccd6ffe..b3c22470b 100644 --- a/test/e2e/container_clone_test.go +++ b/test/e2e/container_clone_test.go @@ -292,4 +292,20 @@ var _ = Describe("Podman container clone", func() { Expect(ok).To(BeTrue()) }) + + It("podman container clone env test", func() { + session := podmanTest.Podman([]string{"run", "--name", "env_ctr", "-e", "ENV_TEST=123", ALPINE, "printenv", "ENV_TEST"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + + session = podmanTest.Podman([]string{"container", "clone", "env_ctr"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + + session = podmanTest.Podman([]string{"start", "-a", "env_ctr-clone"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToString()).Should(ContainSubstring("123")) + + }) }) |