From 354d80626ac4790f261a29a6d53d6cd3fa837bb9 Mon Sep 17 00:00:00 2001 From: James Cassell Date: Wed, 17 Apr 2019 14:16:37 +0000 Subject: auto pass http_proxy into container Signed-off-by: James Cassell --- test/e2e/run_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/e2e') diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index a89ee491b..849fcc477 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -763,4 +763,18 @@ USER mail` session.WaitWithDefaultTimeout() Expect(session.ExitCode()).ToNot(Equal(0)) }) + + It("podman run --http-proxy test", func() { + os.Setenv("http_proxy", "1.2.3.4") + session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "http_proxy"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + match, _ := session.GrepString("1.2.3.4") + Expect(match).Should(BeTrue()) + + session = podmanTest.Podman([]string{"run", "--rm", "--http-proxy=false", ALPINE, "printenv", "http_proxy"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(1)) + os.Unsetenv("http_proxy") + }) }) -- cgit v1.2.3-54-g00ecf