Merge pull request #15434 from rhatdan/manifest1

Allow podman to run in an environment with keys containing spaces
This commit is contained in:
OpenShift Merge Robot
2022-08-24 13:29:20 -04:00
committed by GitHub
4 changed files with 26 additions and 12 deletions

View File

@@ -58,6 +58,13 @@ var _ = Describe("Podman run", func() {
Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(ContainSubstring("/bin"))
// Verify environ keys with spaces do not blow up podman command
os.Setenv("FOO BAR", "BAZ")
session = podmanTest.Podman([]string{"run", "--rm", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
os.Unsetenv("FOO BAR")
os.Setenv("FOO", "BAR")
session = podmanTest.Podman([]string{"run", "--rm", "--env", "FOO", ALPINE, "printenv", "FOO"})
session.WaitWithDefaultTimeout()