mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
test: fix --host-env test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -251,15 +251,15 @@ var _ = Describe("Podman run", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman run --host-env environment test", func() {
|
It("podman run --host-env environment test", func() {
|
||||||
Skip(v2fail)
|
env := append(os.Environ(), "FOO=BAR")
|
||||||
os.Setenv("FOO", "BAR")
|
session := podmanTest.PodmanAsUser([]string{"run", "--rm", "--env-host", ALPINE, "/bin/printenv", "FOO"}, 0, 0, "", env)
|
||||||
session := podmanTest.Podman([]string{"run", "--rm", "--env-host", ALPINE, "printenv", "FOO"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
match, _ := session.GrepString("BAR")
|
match, _ := session.GrepString("BAR")
|
||||||
Expect(match).Should(BeTrue())
|
Expect(match).Should(BeTrue())
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"run", "--rm", "--env", "FOO=BAR1", "--env-host", ALPINE, "printenv", "FOO"})
|
session = podmanTest.PodmanAsUser([]string{"run", "--rm", "--env", "FOO=BAR1", "--env-host", ALPINE, "/bin/printenv", "FOO"}, 0, 0, "", env)
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
match, _ = session.GrepString("BAR1")
|
match, _ = session.GrepString("BAR1")
|
||||||
|
Reference in New Issue
Block a user