This commit is contained in:
Joshua Casey
2024-05-20 11:34:52 -05:00
parent 938bea9910
commit ba2d122308
4 changed files with 17 additions and 7 deletions

View File

@@ -1,3 +1,6 @@
// Copyright 2024 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package githubclient
import (
@@ -107,7 +110,11 @@ func TestNewGitHubClient(t *testing.T) {
require.Equal(t, test.wantBaseURL, actual.client.BaseURL.String())
// Force the githubClient's httpClient roundTrippers to run and add the Authorization header
_, err = actual.client.Client().Get(testServer.URL)
req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, testServer.URL, nil)
require.NoError(t, err)
_, err = actual.client.Client().Do(req) //nolint:bodyclose
require.NoError(t, err)
})
}