@@ -26,49 +26,49 @@ func Test_newSharedInformer(t *testing.T) {
2626 require .NoError (t , err )
2727 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
2828 require .NoError (t , err )
29- informer := newSharedInformer (client , "testns" , labelSelector , fieldSelector )
29+ informer := newSharedInformer (client . K8s , "testns" , labelSelector , fieldSelector )
3030 assert .NotNil (t , informer )
3131}
3232
3333func Test_newSharedNamespaceInformer (t * testing.T ) {
3434 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
3535 require .NoError (t , err )
36- informer := newNamespaceSharedInformer (client )
36+ informer := newNamespaceSharedInformer (client . K8s )
3737 assert .NotNil (t , informer )
3838}
3939
4040func Test_newSharedDeploymentInformer (t * testing.T ) {
4141 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
4242 require .NoError (t , err )
43- informer := newDeploymentSharedInformer (client , "ns" )
43+ informer := newDeploymentSharedInformer (client . K8s , "ns" )
4444 assert .NotNil (t , informer )
4545}
4646
4747func Test_newSharedStatefulSetInformer (t * testing.T ) {
4848 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
4949 require .NoError (t , err )
50- informer := newStatefulSetSharedInformer (client , "ns" )
50+ informer := newStatefulSetSharedInformer (client . K8s , "ns" )
5151 assert .NotNil (t , informer )
5252}
5353
5454func Test_newSharedDaemonSetInformer (t * testing.T ) {
5555 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
5656 require .NoError (t , err )
57- informer := newDaemonSetSharedInformer (client , "ns" )
57+ informer := newDaemonSetSharedInformer (client . K8s , "ns" )
5858 assert .NotNil (t , informer )
5959}
6060
6161func Test_newSharedJobInformer (t * testing.T ) {
6262 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
6363 require .NoError (t , err )
64- informer := newJobSharedInformer (client , "ns" )
64+ informer := newJobSharedInformer (client . K8s , "ns" )
6565 assert .NotNil (t , informer )
6666}
6767
6868func Test_newKubeSystemSharedInformer (t * testing.T ) {
6969 client , err := newFakeAPIClientset (k8sconfig.APIConfig {})
7070 require .NoError (t , err )
71- informer := newKubeSystemSharedInformer (client )
71+ informer := newKubeSystemSharedInformer (client . K8s )
7272 assert .NotNil (t , informer )
7373}
7474
@@ -92,7 +92,7 @@ func Test_informerListFuncWithSelectors(t *testing.T) {
9292 assert .NoError (t , err )
9393 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
9494 assert .NoError (t , err )
95- listFunc := informerListFuncWithSelectors (c , "test-ns" , ls , fs )
95+ listFunc := informerListFuncWithSelectors (c . K8s , "test-ns" , ls , fs )
9696 opts := metav1.ListOptions {}
9797 obj , err := listFunc (t .Context (), opts )
9898 assert .NoError (t , err )
@@ -102,7 +102,7 @@ func Test_informerListFuncWithSelectors(t *testing.T) {
102102func Test_namespaceInformerListFunc (t * testing.T ) {
103103 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
104104 assert .NoError (t , err )
105- listFunc := namespaceInformerListFunc (c )
105+ listFunc := namespaceInformerListFunc (c . K8s )
106106 opts := metav1.ListOptions {}
107107 obj , err := listFunc (t .Context (), opts )
108108 assert .NoError (t , err )
@@ -129,7 +129,7 @@ func Test_informerWatchFuncWithSelectors(t *testing.T) {
129129 assert .NoError (t , err )
130130 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
131131 assert .NoError (t , err )
132- watchFunc := informerWatchFuncWithSelectors (c , "test-ns" , ls , fs )
132+ watchFunc := informerWatchFuncWithSelectors (c . K8s , "test-ns" , ls , fs )
133133 opts := metav1.ListOptions {}
134134 obj , err := watchFunc (t .Context (), opts )
135135 assert .NoError (t , err )
@@ -139,7 +139,7 @@ func Test_informerWatchFuncWithSelectors(t *testing.T) {
139139func Test_namespaceInformerWatchFunc (t * testing.T ) {
140140 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
141141 assert .NoError (t , err )
142- watchFunc := namespaceInformerWatchFunc (c )
142+ watchFunc := namespaceInformerWatchFunc (c . K8s )
143143 opts := metav1.ListOptions {}
144144 obj , err := watchFunc (t .Context (), opts )
145145 assert .NoError (t , err )
@@ -150,7 +150,7 @@ func Test_fakeInformer(t *testing.T) {
150150 // nothing real to test here. just to make coverage happy
151151 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
152152 assert .NoError (t , err )
153- i := NewFakeInformer (c , "ns" , nil , nil )
153+ i := NewFakeInformer (c . K8s , "ns" , nil , nil )
154154 _ , err = i .AddEventHandlerWithResyncPeriod (cache.ResourceEventHandlerFuncs {}, time .Second )
155155 assert .NoError (t , err )
156156 i .HasSynced ()
@@ -163,7 +163,7 @@ func Test_fakeNamespaceInformer(t *testing.T) {
163163 // nothing real to test here. just to make coverage happy
164164 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
165165 assert .NoError (t , err )
166- i := NewFakeNamespaceInformer (c )
166+ i := NewFakeNamespaceInformer (c . K8s )
167167 _ , err = i .AddEventHandlerWithResyncPeriod (cache.ResourceEventHandlerFuncs {}, time .Second )
168168 assert .NoError (t , err )
169169 i .HasSynced ()
@@ -209,7 +209,7 @@ func newTestMetadataClient() clientmeta.Interface {
209209func Test_deploymentWatchFuncWithSelectors (t * testing.T ) {
210210 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
211211 assert .NoError (t , err )
212- watchFunc := deploymentWatchFuncWithSelectors (c , "test-ns" )
212+ watchFunc := deploymentWatchFuncWithSelectors (c . K8s , "test-ns" )
213213 opts := metav1.ListOptions {}
214214 obj , err := watchFunc (t .Context (), opts )
215215 assert .NoError (t , err )
@@ -219,7 +219,7 @@ func Test_deploymentWatchFuncWithSelectors(t *testing.T) {
219219func Test_statefulsetListFuncWithSelectors (t * testing.T ) {
220220 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
221221 assert .NoError (t , err )
222- listFunc := statefulsetListFuncWithSelectors (c , "test-ns" )
222+ listFunc := statefulsetListFuncWithSelectors (c . K8s , "test-ns" )
223223 opts := metav1.ListOptions {}
224224 obj , err := listFunc (t .Context (), opts )
225225 assert .NoError (t , err )
@@ -229,7 +229,7 @@ func Test_statefulsetListFuncWithSelectors(t *testing.T) {
229229func Test_statefulsetWatchFuncWithSelectors (t * testing.T ) {
230230 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
231231 assert .NoError (t , err )
232- watchFunc := statefulsetWatchFuncWithSelectors (c , "test-ns" )
232+ watchFunc := statefulsetWatchFuncWithSelectors (c . K8s , "test-ns" )
233233 opts := metav1.ListOptions {}
234234 obj , err := watchFunc (t .Context (), opts )
235235 assert .NoError (t , err )
@@ -239,7 +239,7 @@ func Test_statefulsetWatchFuncWithSelectors(t *testing.T) {
239239func Test_daemonsetListFuncWithSelectors (t * testing.T ) {
240240 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
241241 assert .NoError (t , err )
242- listFunc := daemonsetListFuncWithSelectors (c , "test-ns" )
242+ listFunc := daemonsetListFuncWithSelectors (c . K8s , "test-ns" )
243243 opts := metav1.ListOptions {}
244244 obj , err := listFunc (t .Context (), opts )
245245 assert .NoError (t , err )
@@ -249,7 +249,7 @@ func Test_daemonsetListFuncWithSelectors(t *testing.T) {
249249func Test_daemonsetWatchFuncWithSelectors (t * testing.T ) {
250250 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
251251 assert .NoError (t , err )
252- watchFunc := daemonsetWatchFuncWithSelectors (c , "test-ns" )
252+ watchFunc := daemonsetWatchFuncWithSelectors (c . K8s , "test-ns" )
253253 opts := metav1.ListOptions {}
254254 obj , err := watchFunc (t .Context (), opts )
255255 assert .NoError (t , err )
@@ -259,7 +259,7 @@ func Test_daemonsetWatchFuncWithSelectors(t *testing.T) {
259259func Test_jobListFuncWithSelectors (t * testing.T ) {
260260 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
261261 assert .NoError (t , err )
262- listFunc := jobListFuncWithSelectors (c , "test-ns" )
262+ listFunc := jobListFuncWithSelectors (c . K8s , "test-ns" )
263263 opts := metav1.ListOptions {}
264264 obj , err := listFunc (t .Context (), opts )
265265 assert .NoError (t , err )
@@ -269,7 +269,7 @@ func Test_jobListFuncWithSelectors(t *testing.T) {
269269func Test_jobWatchFuncWithSelectors (t * testing.T ) {
270270 c , err := newFakeAPIClientset (k8sconfig.APIConfig {})
271271 assert .NoError (t , err )
272- watchFunc := jobWatchFuncWithSelectors (c , "test-ns" )
272+ watchFunc := jobWatchFuncWithSelectors (c . K8s , "test-ns" )
273273 opts := metav1.ListOptions {}
274274 obj , err := watchFunc (t .Context (), opts )
275275 assert .NoError (t , err )
0 commit comments