standardize import of "k8s.io/client-go/kubernetes/fake"

This commit is contained in:
Ryan Richard
2025-12-22 10:34:53 -08:00
parent 3c4c272607
commit 44509d016e
42 changed files with 213 additions and 211 deletions
@@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/fake"
kubefake "k8s.io/client-go/kubernetes/fake"
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
kubetesting "k8s.io/client-go/testing"
clocktesting "k8s.io/utils/clock/testing"
@@ -276,8 +276,8 @@ func TestCreateWithWrongRequesterDataTypes(t *testing.T) {
require.EqualError(t, err, "requester's client must be of type clientregistry.Client")
}
func makeTestSubject(lifetimeFunc timeouts.StorageLifetime) (context.Context, *fake.Clientset, corev1client.SecretInterface, fositeoauth2.AuthorizeCodeStorage) {
client := fake.NewClientset()
func makeTestSubject(lifetimeFunc timeouts.StorageLifetime) (context.Context, *kubefake.Clientset, corev1client.SecretInterface, fositeoauth2.AuthorizeCodeStorage) {
client := kubefake.NewClientset()
secrets := client.CoreV1().Secrets(namespace)
return context.Background(),
client,
@@ -387,7 +387,7 @@ func TestFuzzAndJSONNewValidEmptyAuthorizeCodeSession(t *testing.T) {
const name = "fuzz" // value is irrelevant
ctx := context.Background()
secrets := fake.NewClientset().CoreV1().Secrets(name)
secrets := kubefake.NewClientset().CoreV1().Secrets(name)
storage := New(secrets, func() time.Time { return fakeNow }, func(requester fosite.Requester) time.Duration { return lifetime })
// issue a create using the fuzzed request to confirm that marshalling works