-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e2e: keeps the http_proxy value #16763
Conversation
In a proxy environment, http_proxy needs to keep the value to use a proxy. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
@@ -300,6 +300,11 @@ var _ = Describe("Podman build", func() { | |||
}) | |||
|
|||
It("podman build --http_proxy flag", func() { | |||
if env, found := os.LookupEnv("http_proxy"); found { | |||
defer os.Setenv("http_proxy", env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure it does what you want. Here, the env variable is already set. The defer will set it again but it has not been unset as far as I can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 308 in 8b87665
os.Setenv("http_proxy", "1.2.3.4") |
The http_proxy
value is overwritten with 1.2.3.4
due to os.Setenv("http_proxy", "1.2.3.4")
.
This value needs to revert the original value at this time.
defer os.Setenv("http_proxy", env)
reverts the http_proxy
to original value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
unrelated, but we really should not use 1.2.3.4
for these tests at all. This is a legit IP address and our CI tests are spamming this address which is not under our control. I create an issue for it.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, sstosh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In a proxy environment,
http_proxy
needs to keepthe value to use a proxy.
Signed-off-by: Toshiki Sonoda sonoda.toshiki@fujitsu.com
Does this PR introduce a user-facing change?