@@ -39,7 +39,7 @@ func TestOAuth2ProviderApps(t *testing.T) {
39
39
},
40
40
}})
41
41
42
- ctx := testutil .Context (t , testutil .WaitLong )
42
+ topCtx := testutil .Context (t , testutil .WaitLong )
43
43
44
44
tests := []struct {
45
45
name string
@@ -142,7 +142,7 @@ func TestOAuth2ProviderApps(t *testing.T) {
142
142
CallbackURL : "http://coder.com" ,
143
143
}
144
144
//nolint:gocritic // OAauth2 app management requires owner permission.
145
- _ , err := client .PostOAuth2ProviderApp (ctx , req )
145
+ _ , err := client .PostOAuth2ProviderApp (topCtx , req )
146
146
require .NoError (t , err )
147
147
148
148
// Generate an application for testing PUTs.
@@ -151,13 +151,14 @@ func TestOAuth2ProviderApps(t *testing.T) {
151
151
CallbackURL : "http://coder.com" ,
152
152
}
153
153
//nolint:gocritic // OAauth2 app management requires owner permission.
154
- existingApp , err := client .PostOAuth2ProviderApp (ctx , req )
154
+ existingApp , err := client .PostOAuth2ProviderApp (topCtx , req )
155
155
require .NoError (t , err )
156
156
157
157
for _ , test := range tests {
158
158
test := test
159
159
t .Run (test .name , func (t * testing.T ) {
160
160
t .Parallel ()
161
+ ctx := testutil .Context (t , testutil .WaitLong )
161
162
162
163
//nolint:gocritic // OAauth2 app management requires owner permission.
163
164
_ , err := client .PostOAuth2ProviderApp (ctx , test .req )
@@ -392,11 +393,11 @@ func TestOAuth2ProviderTokenExchange(t *testing.T) {
392
393
},
393
394
},
394
395
})
395
- ctx := testutil .Context (t , testutil .WaitLong )
396
- apps := generateApps (ctx , t , ownerClient , "token-exchange" )
396
+ topCtx := testutil .Context (t , testutil .WaitLong )
397
+ apps := generateApps (topCtx , t , ownerClient , "token-exchange" )
397
398
398
399
//nolint:gocritic // OAauth2 app management requires owner permission.
399
- secret , err := ownerClient .PostOAuth2ProviderAppSecret (ctx , apps .Default .ID )
400
+ secret , err := ownerClient .PostOAuth2ProviderAppSecret (topCtx , apps .Default .ID )
400
401
require .NoError (t , err )
401
402
402
403
// The typical oauth2 flow from this point is:
0 commit comments