mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-08-28 03:46:10 +00:00
update lint ignores regarding no-longer deprecated NewClientset() func
This commit is contained in:
@@ -3864,10 +3864,8 @@ func TestGetKubeconfig(t *testing.T) {
|
||||
kubeObjects := tt.kubeObjects(string(testServerCA))
|
||||
fakeKubeClient = kubefake.NewClientset(kubeObjects...)
|
||||
}
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakeConciergeClient := conciergefake.NewSimpleClientset()
|
||||
if tt.conciergeObjects != nil {
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakeConciergeClient = conciergefake.NewSimpleClientset(tt.conciergeObjects(string(testServerCA), testServer.URL)...)
|
||||
}
|
||||
if len(tt.conciergeReactions) > 0 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2023-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package cmd
|
||||
@@ -293,7 +293,6 @@ func TestWhoami(t *testing.T) {
|
||||
if test.gettingClientsetErr != nil {
|
||||
return nil, nil, nil, test.gettingClientsetErr
|
||||
}
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
conciergeClient := conciergefake.NewSimpleClientset()
|
||||
conciergeClient.PrependReactor("create", "whoamirequests", func(_ kubetesting.Action) (bool, runtime.Object, error) {
|
||||
if test.callingAPIErr != nil {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package cachecleaner
|
||||
@@ -136,8 +136,6 @@ func TestController(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// When we have t.Parallel() here, this test blocks pretty consistently...y tho?
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakeClient := conciergefake.NewSimpleClientset(tt.objects...)
|
||||
informers := conciergeinformers.NewSharedInformerFactory(fakeClient, 0)
|
||||
cache := authncache.New()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package jwtcachefiller
|
||||
@@ -2987,7 +2987,6 @@ func TestController(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset(tt.jwtAuthenticators...)
|
||||
if tt.configClient != nil {
|
||||
tt.configClient(pinnipedAPIClient)
|
||||
@@ -3539,7 +3538,6 @@ func TestControllerFilterSecret(t *testing.T) {
|
||||
kubeInformers := k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0)
|
||||
secretInformer := kubeInformers.Core().V1().Secrets()
|
||||
configMapInformer := kubeInformers.Core().V1().ConfigMaps()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset()
|
||||
pinnipedInformers := conciergeinformers.NewSharedInformerFactory(pinnipedAPIClient, 0)
|
||||
observableInformers := testutil.NewObservableWithInformerOption()
|
||||
@@ -3600,7 +3598,6 @@ func TestControllerFilterConfigMap(t *testing.T) {
|
||||
kubeInformers := k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0)
|
||||
secretInformer := kubeInformers.Core().V1().Secrets()
|
||||
configMapInformer := kubeInformers.Core().V1().ConfigMaps()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset()
|
||||
pinnipedInformers := conciergeinformers.NewSharedInformerFactory(pinnipedAPIClient, 0)
|
||||
observableInformers := testutil.NewObservableWithInformerOption()
|
||||
|
||||
@@ -2066,7 +2066,6 @@ func TestController(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset(tt.webhookAuthenticators...)
|
||||
if tt.configClient != nil {
|
||||
tt.configClient(pinnipedAPIClient)
|
||||
@@ -2329,7 +2328,6 @@ func TestControllerFilterSecret(t *testing.T) {
|
||||
kubeInformers := k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0)
|
||||
secretInformer := kubeInformers.Core().V1().Secrets()
|
||||
configMapInformer := kubeInformers.Core().V1().ConfigMaps()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset()
|
||||
pinnipedInformers := conciergeinformers.NewSharedInformerFactory(pinnipedAPIClient, 0)
|
||||
observableInformers := testutil.NewObservableWithInformerOption()
|
||||
@@ -2393,7 +2391,6 @@ func TestControllerFilterConfigMap(t *testing.T) {
|
||||
kubeInformers := k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0)
|
||||
secretInformer := kubeInformers.Core().V1().Secrets()
|
||||
configMapInformer := kubeInformers.Core().V1().ConfigMaps()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := conciergefake.NewSimpleClientset()
|
||||
pinnipedInformers := conciergeinformers.NewSharedInformerFactory(pinnipedAPIClient, 0)
|
||||
observableInformers := testutil.NewObservableWithInformerOption()
|
||||
|
||||
@@ -1132,7 +1132,6 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
|
||||
//nolint:gosec // cancelContextCancelFunc is called in the After()
|
||||
cancelContext, cancelContextCancelFunc = context.WithCancel(context.Background())
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient = conciergefake.NewSimpleClientset()
|
||||
pinnipedInformers = conciergeinformers.NewSharedInformerFactoryWithOptions(pinnipedInformerClient, 0)
|
||||
|
||||
@@ -1141,7 +1140,6 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
|
||||
k8sinformers.WithNamespace(installedInNamespace),
|
||||
)
|
||||
kubeAPIClient = kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient = conciergefake.NewSimpleClientset()
|
||||
frozenNow = time.Date(2021, time.March, 2, 7, 42, 0, 0, time.Local)
|
||||
mTLSClientCertProvider = dynamiccert.NewCA(name)
|
||||
|
||||
@@ -1777,7 +1777,6 @@ func TestAgentController(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
conciergeClientset := conciergefake.NewSimpleClientset(tt.pinnipedObjects...)
|
||||
conciergeInformers := conciergeinformers.NewSharedInformerFactory(conciergeClientset, 0)
|
||||
|
||||
|
||||
+1
-5
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package activedirectoryupstreamwatcher
|
||||
@@ -95,7 +95,6 @@ func TestActiveDirectoryUpstreamWatcherControllerFilterSecrets(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
activeDirectoryIDPInformer := pinnipedInformers.IDP().V1alpha1().ActiveDirectoryIdentityProviders()
|
||||
@@ -141,7 +140,6 @@ func TestActiveDirectoryUpstreamWatcherControllerFilterConfigMaps(t *testing.T)
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
activeDirectoryIDPInformer := pinnipedInformers.IDP().V1alpha1().ActiveDirectoryIdentityProviders()
|
||||
@@ -187,7 +185,6 @@ func TestActiveDirectoryUpstreamWatcherControllerFilterActiveDirectoryIdentityPr
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
activeDirectoryIDPInformer := pinnipedInformers.IDP().V1alpha1().ActiveDirectoryIdentityProviders()
|
||||
@@ -2310,7 +2307,6 @@ func TestActiveDirectoryUpstreamWatcherControllerSync(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset(tt.inputUpstreams...)
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
fakeKubeClient := kubefake.NewClientset(tt.inputK8sObjects...)
|
||||
|
||||
@@ -2087,9 +2087,7 @@ func TestTestFederationDomainWatcherControllerSync(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
federationDomainsSetter := &fakeFederationDomainsSetter{}
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := supervisorfake.NewSimpleClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient := supervisorfake.NewSimpleClientset()
|
||||
for _, o := range tt.inputObjects {
|
||||
require.NoError(t, pinnipedAPIClient.Tracker().Add(o))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package generator
|
||||
@@ -184,7 +184,6 @@ func TestFederationDomainControllerFilterSecret(t *testing.T) {
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
federationDomainInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().FederationDomains()
|
||||
@@ -247,7 +246,6 @@ func TestNewFederationDomainSecretsControllerFilterFederationDomain(t *testing.T
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
federationDomainInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().FederationDomains()
|
||||
@@ -631,9 +629,7 @@ func TestFederationDomainSecretsControllerSync(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := supervisorfake.NewSimpleClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient := supervisorfake.NewSimpleClientset()
|
||||
|
||||
kubeAPIClient := kubefake.NewClientset()
|
||||
|
||||
-9
@@ -2442,7 +2442,6 @@ func TestController(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakeSupervisorClient := supervisorfake.NewSimpleClientset(tt.githubIdentityProviders...)
|
||||
supervisorInformers := supervisorinformers.NewSharedInformerFactory(fakeSupervisorClient, 0)
|
||||
|
||||
@@ -2836,9 +2835,7 @@ func TestController_OnlyWantActions(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakeSupervisorClient := supervisorfake.NewSimpleClientset(tt.githubIdentityProviders...)
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorInformers := supervisorinformers.NewSharedInformerFactory(supervisorfake.NewSimpleClientset(tt.githubIdentityProviders...), 0)
|
||||
|
||||
if tt.addSupervisorReactors != nil {
|
||||
@@ -2975,9 +2972,7 @@ func TestGitHubUpstreamWatcherControllerFilterSecret(t *testing.T) {
|
||||
_ = New(
|
||||
"some-namespace",
|
||||
dynamicupstreamprovider.NewDynamicUpstreamIDPProvider(),
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorinformers.NewSharedInformerFactory(supervisorfake.NewSimpleClientset(), 0).IDP().V1alpha1().GitHubIdentityProviders(),
|
||||
secretInformer,
|
||||
kubeInformers.Core().V1().ConfigMaps(),
|
||||
@@ -3033,9 +3028,7 @@ func TestGitHubUpstreamWatcherControllerFilterConfigMaps(t *testing.T) {
|
||||
_ = New(
|
||||
namespace,
|
||||
dynamicupstreamprovider.NewDynamicUpstreamIDPProvider(),
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorinformers.NewSharedInformerFactory(supervisorfake.NewSimpleClientset(), 0).IDP().V1alpha1().GitHubIdentityProviders(),
|
||||
k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0).Core().V1().Secrets(),
|
||||
configMapInformer,
|
||||
@@ -3086,13 +3079,11 @@ func TestGitHubUpstreamWatcherControllerFilterGitHubIDP(t *testing.T) {
|
||||
logger, _ := plog.TestLogger(t)
|
||||
|
||||
observableInformers := testutil.NewObservableWithInformerOption()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
gitHubIdentityProviderInformer := supervisorinformers.NewSharedInformerFactory(supervisorfake.NewSimpleClientset(), 0).IDP().V1alpha1().GitHubIdentityProviders()
|
||||
|
||||
_ = New(
|
||||
namespace,
|
||||
dynamicupstreamprovider.NewDynamicUpstreamIDPProvider(),
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
gitHubIdentityProviderInformer,
|
||||
k8sinformers.NewSharedInformerFactoryWithOptions(kubefake.NewClientset(), 0).Core().V1().Secrets(),
|
||||
|
||||
@@ -170,7 +170,6 @@ func TestJWKSObserverControllerSync(t *testing.T) {
|
||||
|
||||
kubeInformerClient = kubefake.NewClientset()
|
||||
kubeInformers = k8sinformers.NewSharedInformerFactory(kubeInformerClient, 0)
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient = supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers = supervisorinformers.NewSharedInformerFactory(pinnipedInformerClient, 0)
|
||||
issuerToJWKSSetter = &fakeIssuerToJWKSMapSetter{}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package supervisorconfig
|
||||
@@ -175,7 +175,6 @@ func TestJWKSWriterControllerFilterSecret(t *testing.T) {
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
federationDomainInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().FederationDomains()
|
||||
@@ -229,7 +228,6 @@ func TestJWKSWriterControllerFilterFederationDomain(t *testing.T) {
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
federationDomainInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().FederationDomains()
|
||||
@@ -685,9 +683,7 @@ func TestJWKSWriterControllerSync(t *testing.T) {
|
||||
test.configKubeClient(kubeAPIClient)
|
||||
}
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedAPIClient := supervisorfake.NewSimpleClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient := supervisorfake.NewSimpleClientset()
|
||||
for _, federationDomain := range test.federationDomains {
|
||||
require.NoError(t, pinnipedAPIClient.Tracker().Add(federationDomain))
|
||||
|
||||
+1
-5
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package ldapupstreamwatcher
|
||||
@@ -94,7 +94,6 @@ func TestLDAPUpstreamWatcherControllerFilterSecrets(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
ldapIDPInformer := pinnipedInformers.IDP().V1alpha1().LDAPIdentityProviders()
|
||||
@@ -140,7 +139,6 @@ func TestLDAPUpstreamWatcherControllerFilterConfigMaps(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
ldapIDPInformer := pinnipedInformers.IDP().V1alpha1().LDAPIdentityProviders()
|
||||
@@ -186,7 +184,6 @@ func TestLDAPUpstreamWatcherControllerFilterLDAPIdentityProviders(t *testing.T)
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
ldapIDPInformer := pinnipedInformers.IDP().V1alpha1().LDAPIdentityProviders()
|
||||
@@ -1408,7 +1405,6 @@ func TestLDAPUpstreamWatcherControllerSync(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset(tt.inputUpstreams...)
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
fakeKubeClient := kubefake.NewClientset(tt.inputSecrets...)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2022-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package oidcclientwatcher
|
||||
@@ -67,7 +67,6 @@ func TestOIDCClientWatcherControllerFilterSecret(t *testing.T) {
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
oidcClientsInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().OIDCClients()
|
||||
@@ -137,7 +136,6 @@ func TestOIDCClientWatcherControllerFilterOIDCClient(t *testing.T) {
|
||||
0,
|
||||
).Core().V1().Secrets()
|
||||
oidcClientsInformer := supervisorinformers.NewSharedInformerFactory(
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorfake.NewSimpleClientset(),
|
||||
0,
|
||||
).Config().V1alpha1().OIDCClients()
|
||||
@@ -958,9 +956,8 @@ func TestOIDCClientWatcherControllerSync(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset(tt.inputObjects...)
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClientForInformers := supervisorfake.NewSimpleClientset(tt.inputObjects...)
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClientForInformers, 0)
|
||||
fakeKubeClient := kubefake.NewClientset(tt.inputSecrets...)
|
||||
|
||||
+1
-3
@@ -101,7 +101,6 @@ func TestOIDCUpstreamWatcherControllerFilterSecret(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
fakeKubeClient := kubefake.NewClientset()
|
||||
@@ -162,7 +161,6 @@ func TestOIDCUpstreamWatcherControllerFilterConfigMaps(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
fakeKubeClient := kubefake.NewClientset()
|
||||
@@ -1762,7 +1760,7 @@ func TestOIDCUpstreamWatcherControllerSync(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
|
||||
fakePinnipedClient := supervisorfake.NewSimpleClientset(tt.inputUpstreams...)
|
||||
pinnipedInformers := supervisorinformers.NewSharedInformerFactory(fakePinnipedClient, 0)
|
||||
fakeKubeClient := kubefake.NewClientset(tt.inputResources...)
|
||||
|
||||
@@ -183,7 +183,6 @@ func TestTLSCertObserverControllerSync(t *testing.T) {
|
||||
|
||||
kubeInformerClient = kubefake.NewClientset()
|
||||
kubeInformers = k8sinformers.NewSharedInformerFactory(kubeInformerClient, 0)
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
pinnipedInformerClient = supervisorfake.NewSimpleClientset()
|
||||
pinnipedInformers = supervisorinformers.NewSharedInformerFactory(pinnipedInformerClient, 0)
|
||||
issuerTLSCertSetter = &fakeIssuerTLSCertSetter{}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2021-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package clientregistry
|
||||
@@ -258,7 +258,6 @@ func TestClientManager(t *testing.T) {
|
||||
|
||||
kubeClient := kubefake.NewClientset()
|
||||
secrets := kubeClient.CoreV1().Secrets(testNamespace)
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients(testNamespace)
|
||||
subject := NewClientManager(
|
||||
|
||||
@@ -4233,7 +4233,6 @@ func TestAuthorizationEndpoint(t *testing.T) { //nolint:gocyclo
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
kubeClient := kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
secretsClient := kubeClient.CoreV1().Secrets("some-namespace")
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
@@ -4270,7 +4269,6 @@ func TestAuthorizationEndpoint(t *testing.T) { //nolint:gocyclo
|
||||
require.Equal(t, "OIDC upstream browser flow happy path using GET without a CSRF cookie", test.name)
|
||||
|
||||
kubeClient := kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
secretsClient := kubeClient.CoreV1().Secrets("some-namespace")
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
|
||||
@@ -2167,7 +2167,6 @@ func TestCallbackEndpoint(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
kubeClient := kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
secrets := kubeClient.CoreV1().Secrets("some-namespace")
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
|
||||
@@ -1297,7 +1297,6 @@ func TestPostLoginEndpoint(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
kubeClient := kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
secretsClient := kubeClient.CoreV1().Secrets("some-namespace")
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
|
||||
@@ -5220,7 +5220,6 @@ func exchangeAuthcodeForTokens(
|
||||
}
|
||||
|
||||
kubeClient := kubefake.NewClientset()
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
secrets = kubeClient.CoreV1().Secrets("some-namespace")
|
||||
oidcClientsClient := supervisorClient.ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
|
||||
@@ -347,7 +347,6 @@ func TestManager(t *testing.T) {
|
||||
|
||||
kubeClient = kubefake.NewClientset()
|
||||
secretsClient := kubeClient.CoreV1().Secrets("some-namespace")
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
oidcClientsClient := supervisorfake.NewSimpleClientset().ConfigV1alpha1().OIDCClients("some-namespace")
|
||||
|
||||
cache := secret.Cache{}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2025 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2022-2026 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package clientsecretrequest
|
||||
@@ -1644,7 +1644,6 @@ func TestCreate(t *testing.T) {
|
||||
tt.seedHashes(oidcClientSecretStore)
|
||||
}
|
||||
|
||||
//nolint:staticcheck // our codegen does not yet generate a NewClientset() function
|
||||
supervisorClient := supervisorfake.NewSimpleClientset()
|
||||
if tt.seedOIDCClients != nil {
|
||||
for _, client := range tt.seedOIDCClients {
|
||||
|
||||
Reference in New Issue
Block a user