mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-05 07:37:12 +00:00
Improve unit tests in tokenclient_test.go
Also fix a linter error and rename some new files.
This commit is contained in:
@@ -274,7 +274,7 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
|
||||
const httpsPort = ":443"
|
||||
const fakeServerResponseBody = "hello, world!"
|
||||
const externallyProvidedTLSSecretName = "external-tls-secret" //nolint:gosec // this is not a credential
|
||||
fakeExpiringSingletonTokenCacheGet := *new(tokenclient.ExpiringSingletonTokenCacheGet)
|
||||
var fakeExpiringSingletonTokenCacheGet = tokenclient.NewExpiringSingletonTokenCache()
|
||||
var labels = map[string]string{"app": "app-name", "other-key": "other-value"}
|
||||
|
||||
var r *require.Assertions
|
||||
|
||||
+2
@@ -132,6 +132,8 @@ func TestSync(t *testing.T) {
|
||||
} {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
kubeAPIClient, kubeInformers := setupKubernetes(t, tt.namespace)
|
||||
if tt.addReactors != nil {
|
||||
tt.addReactors(kubeAPIClient)
|
||||
Reference in New Issue
Block a user