From ec133b9743b6a9bfa8ea03dba99e4766da3f8db4 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Thu, 4 Mar 2021 17:44:01 -0800 Subject: [PATCH] Resolve some new linter errors --- test/integration/e2e_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/integration/e2e_test.go b/test/integration/e2e_test.go index fb7b8b90..3e950a25 100644 --- a/test/integration/e2e_test.go +++ b/test/integration/e2e_test.go @@ -279,7 +279,10 @@ func TestE2EFullIntegration(t *testing.T) { // Create an HTTP client that can reach the downstream discovery endpoint using the CA certs. httpClient := &http.Client{ Transport: &http.Transport{ - TLSClientConfig: &tls.Config{RootCAs: kubeconfigCA}, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + RootCAs: kubeconfigCA, + }, Proxy: func(req *http.Request) (*url.URL, error) { if env.Proxy == "" { t.Logf("passing request for %s with no proxy", req.URL) @@ -292,7 +295,9 @@ func TestE2EFullIntegration(t *testing.T) { }, }, } - resp, err := httpClient.Get(restConfig.Host) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, restConfig.Host, nil) + require.NoError(t, err) + resp, err := httpClient.Do(req) //nolint:bodyclose if err != nil { t.Logf("could not connect to the API server at %q: %v", restConfig.Host, err) return false