Skip to content

Commit 7af6c3a

Browse files
committed
fix tests
1 parent 303ea30 commit 7af6c3a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

coderd/userauth_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,10 @@ func TestUserOAuth2Github(t *testing.T) {
10171017
Name: "oauth_state",
10181018
Value: "somestate",
10191019
})
1020+
req.AddCookie(&http.Cookie{
1021+
Name: codersdk.OAuth2PKCEChallenge,
1022+
Value: oauth2.GenerateVerifier(),
1023+
})
10201024
require.NoError(t, err)
10211025
res, err = client.HTTPClient.Do(req)
10221026
require.NoError(t, err)
@@ -2460,6 +2464,10 @@ func oauth2Callback(t *testing.T, client *codersdk.Client, opts ...func(*http.Re
24602464
Name: codersdk.OAuth2StateCookie,
24612465
Value: state,
24622466
})
2467+
req.AddCookie(&http.Cookie{
2468+
Name: codersdk.OAuth2PKCEChallenge,
2469+
Value: oauth2.GenerateVerifier(),
2470+
})
24632471
res, err := client.HTTPClient.Do(req)
24642472
require.NoError(t, err)
24652473
t.Cleanup(func() {

0 commit comments

Comments
 (0)