Fix the tests hanging on the open channel.

This commit is contained in:
2024-10-04 14:39:37 +01:00
parent 78b9d611f0
commit 6f2cf65d49
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -266,7 +266,6 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
t.jwtVerifier = t
t.startTokenCleanup()
go t.initializeMetadata(config.ProviderURL)
return t, nil
}
+2 -1
View File
@@ -95,8 +95,9 @@ func (ts *TestSuite) Setup() {
httpClient: &http.Client{},
exchangeCodeForTokenFunc: ts.exchangeCodeForTokenFunc,
extractClaimsFunc: extractClaims,
initComplete: make(chan struct{}),
}
close(ts.tOidc.initComplete)
ts.tOidc.tokenVerifier = ts.tOidc
ts.tOidc.jwtVerifier = ts.tOidc
}