fixup! fixup! Splitting code into multiple files with reasonable testing coverage.

This commit is contained in:
2025-09-09 09:20:10 +01:00
parent c04f949656
commit a31fd64112
17 changed files with 1360 additions and 208 deletions
+5 -1
View File
@@ -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,
}