mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
replace the client with clientset in controllers
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/resource"
|
||||
"k8s.io/kubernetes/pkg/client/testing/fake"
|
||||
"k8s.io/kubernetes/pkg/client/unversioned/testclient"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
@@ -173,7 +174,7 @@ func TestSyncResourceQuota(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
kubeClient := testclient.NewSimpleFake(&podList, "a)
|
||||
kubeClient := fake.NewSimpleClientset(&podList, "a)
|
||||
|
||||
ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second))
|
||||
err := ResourceQuotaController.syncResourceQuota(quota)
|
||||
@@ -230,7 +231,7 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
kubeClient := testclient.NewSimpleFake("a)
|
||||
kubeClient := fake.NewSimpleClientset("a)
|
||||
|
||||
ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second))
|
||||
err := ResourceQuotaController.syncResourceQuota(quota)
|
||||
@@ -277,7 +278,7 @@ func TestSyncResourceQuotaNoChange(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
kubeClient := testclient.NewSimpleFake(&api.PodList{}, "a)
|
||||
kubeClient := fake.NewSimpleClientset(&api.PodList{}, "a)
|
||||
|
||||
ResourceQuotaController := NewResourceQuotaController(kubeClient, controller.StaticResyncPeriodFunc(time.Second))
|
||||
err := ResourceQuotaController.syncResourceQuota(quota)
|
||||
|
||||
Reference in New Issue
Block a user