diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-08 12:35:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 12:35:09 +0200 |
commit | 051f8b0a62784ea625e7690bdd63c754226416b9 (patch) | |
tree | 0999bc333cdbd34d6284e3430f235a5734fabfdd | |
parent | d729dd8c2e6556de10c4543c018fbebffa265a5e (diff) | |
parent | 626ee118c8b39e2cd17b2d88e651d2e39fa60ec4 (diff) | |
download | podman-051f8b0a62784ea625e7690bdd63c754226416b9.tar.gz podman-051f8b0a62784ea625e7690bdd63c754226416b9.tar.bz2 podman-051f8b0a62784ea625e7690bdd63c754226416b9.zip |
Merge pull request #15681 from sstosh/fix-e2e-sameip-proxy
e2e: fix run_staticip_test in proxy environment
-rw-r--r-- | test/e2e/run_staticip_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go index 8207f6d0b..12783cd29 100644 --- a/test/e2e/run_staticip_test.go +++ b/test/e2e/run_staticip_test.go @@ -105,6 +105,13 @@ var _ = Describe("Podman run with --ip flag", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) + // We need to set "no_proxy" in proxy environment + if env, found := os.LookupEnv("no_proxy"); found { + defer os.Setenv("no_proxy", env) + } else { + defer os.Unsetenv("no_proxy") + } + os.Setenv("no_proxy", ip) for retries := 20; retries > 0; retries-- { response, err := http.Get(fmt.Sprintf("http://%s", ip)) if err == nil && response.StatusCode == http.StatusOK { |