Add some debugging logs to our proxy client code.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-12-03 10:25:26 -06:00
parent d7b1ab8e43
commit 954591d2db
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D

View File

@ -57,9 +57,13 @@ func TestSupervisorLogin(t *testing.T) {
TLSClientConfig: &tls.Config{RootCAs: ca.Pool()},
Proxy: func(req *http.Request) (*url.URL, error) {
if env.Proxy == "" {
t.Logf("passing request for %s with no proxy", req.URL)
return nil, nil
}
return url.Parse(env.Proxy)
proxyURL, err := url.Parse(env.Proxy)
require.NoError(t, err)
t.Logf("passing request for %s through proxy %s", req.URL, proxyURL.String())
return proxyURL, nil
},
}}