Skip to content

Commit 242c4d7

Browse files
authored
fix(coderd): isolate OIDC fake IDP in parallel subtests (#26075)
1 parent 45475b8 commit 242c4d7

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

coderd/userauth_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,13 +1770,6 @@ func TestUserOIDC(t *testing.T) {
17701770
t.Run("OIDCEmailFallbackBlockedByExistingLink", func(t *testing.T) {
17711771
t.Parallel()
17721772

1773-
fake := oidctest.NewFakeIDP(t,
1774-
oidctest.WithRefresh(func(_ string) error {
1775-
return xerrors.New("refreshing token should never occur")
1776-
}),
1777-
oidctest.WithServing(),
1778-
)
1779-
17801773
for _, tc := range []struct {
17811774
name string
17821775
allowSignups bool
@@ -1788,6 +1781,12 @@ func TestUserOIDC(t *testing.T) {
17881781
t.Run(tc.name, func(t *testing.T) {
17891782
t.Parallel()
17901783

1784+
fake := oidctest.NewFakeIDP(t,
1785+
oidctest.WithRefresh(func(_ string) error {
1786+
return xerrors.New("refreshing token should never occur")
1787+
}),
1788+
oidctest.WithServing(),
1789+
)
17911790
cfg := fake.OIDCConfig(t, nil, func(cfg *coderd.OIDCConfig) {
17921791
cfg.AllowSignups = tc.allowSignups
17931792
})

0 commit comments

Comments
 (0)