-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
change TestNewAPIClientFromFlagsWithHttpProxyEnv to an e2e test #3221
Conversation
f7c0643
to
0019cda
Compare
Codecov Report
@@ Coverage Diff @@
## master #3221 +/- ##
=======================================
Coverage 58.58% 58.58%
=======================================
Files 299 299
Lines 21502 21502
=======================================
Hits 12597 12597
Misses 7983 7983
Partials 922 922 |
Golang uses a `sync.Once` when determining the proxy to use. This means that it's not possible to test the proxy configuration in unit tests, because the proxy configuration will be "fixated" the first time Golang detects the proxy configuration. This patch changes TestNewAPIClientFromFlagsWithHttpProxyEnv to an e2e test so that we can verify the CLI picks up the proxy configuration. Signed-off-by: Sebastiaan van Stijn <[email protected]>
0019cda
to
40c6b11
Compare
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
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
relates to #3197
Golang uses a
sync.Once
when determining the proxy to use. This meansthat it's not possible to test the proxy configuration in unit tests,
because the proxy configuration will be "fixated" the first time Golang
detects the proxy configuration.
This patch changes TestNewAPIClientFromFlagsWithHttpProxyEnv to an e2e
test, so that we can verify the CLI picks up the proxy configuration.