@@ -113,11 +113,8 @@ func TestClusterStatusController_Reconcile(t *testing.T) {
113113 Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
114114 GenericInformerManager : genericmanager .GetInstance (),
115115 TypedInformerManager : typedmanager .GetInstance (),
116- ClusterClientOption : & util.ClientOption {
117- QPS : 5 ,
118- Burst : 10 ,
119- },
120- ClusterClientSetFunc : util .NewClusterClientSet ,
116+ ClusterClientOption : & util.ClientOption {},
117+ ClusterClientSetFunc : util .NewClusterClientSet ,
121118 }
122119
123120 if tt .cluster != nil {
@@ -900,11 +897,8 @@ func TestClusterStatusController_updateStatusIfNeeded(t *testing.T) {
900897 ).WithStatusSubresource (cluster ).Build (),
901898 GenericInformerManager : genericmanager .GetInstance (),
902899 TypedInformerManager : typedmanager .GetInstance (),
903- ClusterClientOption : & util.ClientOption {
904- QPS : 5 ,
905- Burst : 10 ,
906- },
907- ClusterClientSetFunc : util .NewClusterClientSet ,
900+ ClusterClientOption : & util.ClientOption {},
901+ ClusterClientSetFunc : util .NewClusterClientSet ,
908902 }
909903
910904 err := c .updateStatusIfNeeded (context .Background (), cluster , currentClusterStatus )
@@ -964,32 +958,26 @@ func TestClusterStatusController_updateStatusIfNeeded(t *testing.T) {
964958 Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
965959 GenericInformerManager : genericmanager .GetInstance (),
966960 TypedInformerManager : typedmanager .GetInstance (),
967- ClusterClientOption : & util.ClientOption {
968- QPS : 5 ,
969- Burst : 10 ,
970- },
971- ClusterClientSetFunc : util .NewClusterClientSet ,
961+ ClusterClientOption : & util.ClientOption {},
962+ ClusterClientSetFunc : util .NewClusterClientSet ,
972963 }
973964
974965 err := c .updateStatusIfNeeded (context .Background (), cluster , currentClusterStatus )
975966 assert .NotEmpty (t , err , "updateStatusIfNeeded doesn't return error" )
976967 })
977968}
978969
979- func NewClusterDynamicClientSetForAgentWithError (_ string , _ client.Client ) (* util.DynamicClusterClient , error ) {
970+ func NewClusterDynamicClientSetForAgentWithError (_ string , _ client.Client , _ * util. ClientOption ) (* util.DynamicClusterClient , error ) {
980971 return nil , fmt .Errorf ("err" )
981972}
982973
983974func TestClusterStatusController_initializeGenericInformerManagerForCluster (t * testing.T ) {
984975 t .Run ("failed to create dynamicClient" , func (* testing.T ) {
985976 c := & ClusterStatusController {
986- Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
987- GenericInformerManager : genericmanager .GetInstance (),
988- TypedInformerManager : typedmanager .GetInstance (),
989- ClusterClientOption : & util.ClientOption {
990- QPS : 5 ,
991- Burst : 10 ,
992- },
977+ Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
978+ GenericInformerManager : genericmanager .GetInstance (),
979+ TypedInformerManager : typedmanager .GetInstance (),
980+ ClusterClientOption : & util.ClientOption {},
993981 ClusterClientSetFunc : util .NewClusterClientSet ,
994982 ClusterDynamicClientSetFunc : NewClusterDynamicClientSetForAgentWithError ,
995983 }
@@ -1002,13 +990,10 @@ func TestClusterStatusController_initializeGenericInformerManagerForCluster(t *t
1002990
1003991 t .Run ("suc to create dynamicClient" , func (* testing.T ) {
1004992 c := & ClusterStatusController {
1005- Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
1006- GenericInformerManager : genericmanager .GetInstance (),
1007- TypedInformerManager : typedmanager .GetInstance (),
1008- ClusterClientOption : & util.ClientOption {
1009- QPS : 5 ,
1010- Burst : 10 ,
1011- },
993+ Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
994+ GenericInformerManager : genericmanager .GetInstance (),
995+ TypedInformerManager : typedmanager .GetInstance (),
996+ ClusterClientOption : & util.ClientOption {},
1012997 ClusterClientSetFunc : util .NewClusterClientSet ,
1013998 ClusterDynamicClientSetFunc : util .NewClusterDynamicClientSetForAgent ,
1014999 }
@@ -1022,13 +1007,10 @@ func TestClusterStatusController_initializeGenericInformerManagerForCluster(t *t
10221007
10231008func TestClusterStatusController_initLeaseController (_ * testing.T ) {
10241009 c := & ClusterStatusController {
1025- Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
1026- GenericInformerManager : genericmanager .GetInstance (),
1027- TypedInformerManager : typedmanager .GetInstance (),
1028- ClusterClientOption : & util.ClientOption {
1029- QPS : 5 ,
1030- Burst : 10 ,
1031- },
1010+ Client : fake .NewClientBuilder ().WithScheme (gclient .NewSchema ()).Build (),
1011+ GenericInformerManager : genericmanager .GetInstance (),
1012+ TypedInformerManager : typedmanager .GetInstance (),
1013+ ClusterClientOption : & util.ClientOption {},
10321014 ClusterClientSetFunc : util .NewClusterClientSet ,
10331015 ClusterDynamicClientSetFunc : NewClusterDynamicClientSetForAgentWithError ,
10341016 }
0 commit comments