mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-17 04:37:48 +00:00
Fix the tests hanging on the open channel.
This commit is contained in:
@@ -266,7 +266,6 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
|
|||||||
t.jwtVerifier = t
|
t.jwtVerifier = t
|
||||||
t.startTokenCleanup()
|
t.startTokenCleanup()
|
||||||
go t.initializeMetadata(config.ProviderURL)
|
go t.initializeMetadata(config.ProviderURL)
|
||||||
|
|
||||||
return t, nil
|
return t, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -95,8 +95,9 @@ func (ts *TestSuite) Setup() {
|
|||||||
httpClient: &http.Client{},
|
httpClient: &http.Client{},
|
||||||
exchangeCodeForTokenFunc: ts.exchangeCodeForTokenFunc,
|
exchangeCodeForTokenFunc: ts.exchangeCodeForTokenFunc,
|
||||||
extractClaimsFunc: extractClaims,
|
extractClaimsFunc: extractClaims,
|
||||||
|
initComplete: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
close(ts.tOidc.initComplete)
|
||||||
ts.tOidc.tokenVerifier = ts.tOidc
|
ts.tOidc.tokenVerifier = ts.tOidc
|
||||||
ts.tOidc.jwtVerifier = ts.tOidc
|
ts.tOidc.jwtVerifier = ts.tOidc
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user