mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-15 04:18:03 +00:00
fixup! fixup! Splitting code into multiple files with reasonable testing coverage.
This commit is contained in:
@@ -244,6 +244,9 @@ func setupTestOIDCMiddleware(t *testing.T, config *Config) (*TraefikOidc, *httpt
|
||||
// Create WaitGroup for background goroutines
|
||||
var wg sync.WaitGroup
|
||||
|
||||
// Create context with cancel for proper cleanup
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
// Create TraefikOidc instance directly
|
||||
oidc := &TraefikOidc{
|
||||
next: nextHandler,
|
||||
@@ -274,7 +277,8 @@ func setupTestOIDCMiddleware(t *testing.T, config *Config) (*TraefikOidc, *httpt
|
||||
allowedUserDomains: make(map[string]struct{}),
|
||||
jwkCache: &JWKCache{},
|
||||
metadataCache: NewMetadataCache(nil),
|
||||
ctx: context.Background(),
|
||||
ctx: ctx,
|
||||
cancelFunc: cancel,
|
||||
goroutineWG: &wg,
|
||||
providerURL: serverURL,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user