Skip to content

Commit bf0e1ce

Browse files
committed
Fix data race'
1 parent 904ce34 commit bf0e1ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

enterprise/coderd/workspaceproxy_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,10 @@ func TestIssueSignedAppToken(t *testing.T) {
385385
})
386386
require.NoError(t, err)
387387

388-
proxyClient := wsproxysdk.New(client.URL)
389-
proxyClient.SetSessionToken(proxyRes.ProxyToken)
390-
391388
t.Run("BadAppRequest", func(t *testing.T) {
392389
t.Parallel()
390+
proxyClient := wsproxysdk.New(client.URL)
391+
proxyClient.SetSessionToken(proxyRes.ProxyToken)
393392

394393
ctx := testutil.Context(t, testutil.WaitLong)
395394
_, err = proxyClient.IssueSignedAppToken(ctx, workspaceapps.IssueTokenRequest{
@@ -410,6 +409,8 @@ func TestIssueSignedAppToken(t *testing.T) {
410409
}
411410
t.Run("OK", func(t *testing.T) {
412411
t.Parallel()
412+
proxyClient := wsproxysdk.New(client.URL)
413+
proxyClient.SetSessionToken(proxyRes.ProxyToken)
413414

414415
ctx := testutil.Context(t, testutil.WaitLong)
415416
_, err = proxyClient.IssueSignedAppToken(ctx, goodRequest)
@@ -418,6 +419,8 @@ func TestIssueSignedAppToken(t *testing.T) {
418419

419420
t.Run("OKHTML", func(t *testing.T) {
420421
t.Parallel()
422+
proxyClient := wsproxysdk.New(client.URL)
423+
proxyClient.SetSessionToken(proxyRes.ProxyToken)
421424

422425
rw := httptest.NewRecorder()
423426
ctx := testutil.Context(t, testutil.WaitLong)

0 commit comments

Comments
 (0)