mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): isolate OIDC fake IDP in parallel subtests (#26075)
This commit is contained in:
@@ -1770,13 +1770,6 @@ func TestUserOIDC(t *testing.T) {
|
||||
t.Run("OIDCEmailFallbackBlockedByExistingLink", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
fake := oidctest.NewFakeIDP(t,
|
||||
oidctest.WithRefresh(func(_ string) error {
|
||||
return xerrors.New("refreshing token should never occur")
|
||||
}),
|
||||
oidctest.WithServing(),
|
||||
)
|
||||
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
allowSignups bool
|
||||
@@ -1788,6 +1781,12 @@ func TestUserOIDC(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
fake := oidctest.NewFakeIDP(t,
|
||||
oidctest.WithRefresh(func(_ string) error {
|
||||
return xerrors.New("refreshing token should never occur")
|
||||
}),
|
||||
oidctest.WithServing(),
|
||||
)
|
||||
cfg := fake.OIDCConfig(t, nil, func(cfg *coderd.OIDCConfig) {
|
||||
cfg.AllowSignups = tc.allowSignups
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user