Skip to content
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

Fix test breaking when a proxy is configured on the host #5471

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

kfox1111
Copy link
Contributor

@kfox1111 kfox1111 commented Sep 5, 2024

When the host has HTTP_PROXY settings defined, one of the new http_challege node agent tests will forward the request to the proxy from the local environment, which can't handle the request, rather then redirecting back to the test fixture properly. This patch changes the test to function like the rest of the http_challenge tests and calls back to the test fixture directly.

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
@@ -79,13 +79,14 @@ func TestValidateChallenge(t *testing.T) {
}))
defer func() { testServer.Close() }()

transport := http.DefaultTransport.(*http.Transport).Clone()
Copy link
Contributor Author

@kfox1111 kfox1111 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DefaultTransport honors HTTP_PROXY env vars. We should actually start from a new Transport like elsewhere.

@kfox1111
Copy link
Contributor Author

kfox1111 commented Sep 5, 2024

@edwbuck

@MarcosDY MarcosDY merged commit 024435d into spiffe:main Sep 6, 2024
33 of 34 checks passed
@MarcosDY MarcosDY added this to the 1.11.0 milestone Sep 6, 2024
@kfox1111 kfox1111 deleted the test-fix branch September 6, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants