Skip to content

Commit cae4e61

Browse files
committed
Fix test race
1 parent 22ff6c8 commit cae4e61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

enterprise/coderd/oauth2_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ func TestOAuth2ProviderTokenExchange(t *testing.T) {
694694
// app at a time and running tests in parallel could clobber each other.
695695
userClient, user := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID)
696696
if test.setup != nil {
697-
err = test.setup(ctx, userClient, user)
697+
err := test.setup(ctx, userClient, user)
698+
require.NoError(t, err)
698699
}
699700

700701
// Each test gets its own oauth2.Config so they can run in parallel.
@@ -721,6 +722,7 @@ func TestOAuth2ProviderTokenExchange(t *testing.T) {
721722
if test.defaultCode != nil {
722723
code = *test.defaultCode
723724
} else {
725+
var err error
724726
code, err = authorizationFlow(ctx, userClient, valid)
725727
if test.authError != "" {
726728
require.Error(t, err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy