mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-03 11:45:45 +00:00
fix deprecation of NewSimpleClientset by using NewClientset or ignoring
This commit is contained in:
@@ -3858,14 +3858,17 @@ func TestGetKubeconfig(t *testing.T) {
|
||||
if tt.getClientsetErr != nil {
|
||||
return nil, nil, nil, tt.getClientsetErr
|
||||
}
|
||||
//nolint:staticcheck // as of v0.35.0, this package does not offer a NewClientset() function
|
||||
fakeAggregatorClient := aggregatorfake.NewSimpleClientset(tt.apiServiceObjects...)
|
||||
fakeKubeClient := fake.NewClientset()
|
||||
if tt.kubeObjects != nil {
|
||||
kubeObjects := tt.kubeObjects(string(testServerCA))
|
||||
fakeKubeClient = fake.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 {
|
||||
|
||||
@@ -293,6 +293,7 @@ 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 {
|
||||
|
||||
Reference in New Issue
Block a user