Skip to content

Commit 1ea0af3

Browse files
committed
Use req with context
1 parent 3349b11 commit 1ea0af3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coderd/promoauth/oauth2_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ func TestInstrument(t *testing.T) {
5959
// Verify the default client was not broken. This check is added because we
6060
// extend the http.DefaultTransport. If a `.Clone()` is not done, this can be
6161
// mis-used. It is cheap to run this quick check.
62-
req, err := http.NewRequest(http.MethodGet,
62+
req, err := http.NewRequestWithContext(ctx, http.MethodGet,
6363
must(idp.IssuerURL().Parse("/.well-known/openid-configuration")).String(), nil)
6464
require.NoError(t, err)
65-
req = req.WithContext(ctx)
6665

6766
resp, err := http.DefaultClient.Do(req)
6867
require.NoError(t, err)

0 commit comments

Comments
 (0)