@@ -113,7 +113,7 @@ var _ = Describe("Informer Cache", func() {
113113 It ("should be able to list objects that haven't been watched previously" , func () {
114114 By ("listing all services in the cluster" )
115115 listObj := & kcorev1.ServiceList {}
116- Expect (informerCache .List (context .Background (), nil , listObj )).To (Succeed ())
116+ Expect (informerCache .List (context .Background (), listObj )).To (Succeed ())
117117
118118 By ("verifying that the returned list contains the Kubernetes service" )
119119 // NB: kubernetes default service is automatically created in testenv.
@@ -143,8 +143,10 @@ var _ = Describe("Informer Cache", func() {
143143 By ("listing pods with a particular label" )
144144 // NB: each pod has a "test-label": <pod-name>
145145 out := kcorev1.PodList {}
146- Expect (informerCache .List (context .Background (), client .InNamespace (testNamespaceTwo ).
147- MatchingLabels (map [string ]string {"test-label" : "test-pod-2" }), & out )).To (Succeed ())
146+ Expect (informerCache .List (context .Background (), & out ,
147+ client .InNamespace (testNamespaceTwo ),
148+ client .MatchingLabels (map [string ]string {"test-label" : "test-pod-2" }),
149+ )).To (Succeed ())
148150
149151 By ("verifying the returned pods have the correct label" )
150152 Expect (out .Items ).NotTo (BeEmpty ())
@@ -161,8 +163,9 @@ var _ = Describe("Informer Cache", func() {
161163 // NB: each pod has a "test-label": <pod-name>
162164 out := kcorev1.PodList {}
163165 labels := map [string ]string {"test-label" : "test-pod-2" }
164- Expect (informerCache .List (context .Background (),
165- client .MatchingLabels (labels ), & out )).To (Succeed ())
166+ Expect (informerCache .List (context .Background (), & out ,
167+ client .MatchingLabels (labels ),
168+ )).To (Succeed ())
166169
167170 By ("verifying multiple pods with the same label in different namespaces are returned" )
168171 Expect (out .Items ).NotTo (BeEmpty ())
@@ -177,9 +180,9 @@ var _ = Describe("Informer Cache", func() {
177180 It ("should be able to list objects by namespace" , func () {
178181 By ("listing pods in test-namespace-1" )
179182 listObj := & kcorev1.PodList {}
180- Expect (informerCache .List (context .Background (),
183+ Expect (informerCache .List (context .Background (), listObj ,
181184 client .InNamespace (testNamespaceOne ),
182- listObj )).To (Succeed ())
185+ )).To (Succeed ())
183186
184187 By ("verifying that the returned pods are in test-namespace-1" )
185188 Expect (listObj .Items ).NotTo (BeEmpty ())
@@ -317,9 +320,9 @@ var _ = Describe("Informer Cache", func() {
317320
318321 By ("listing Pods with restartPolicyOnFailure" )
319322 listObj := & kcorev1.PodList {}
320- Expect (informer .List (context .Background (),
323+ Expect (informer .List (context .Background (), listObj ,
321324 client .MatchingField ("spec.restartPolicy" , "OnFailure" ),
322- listObj )).To (Succeed ())
325+ )).To (Succeed ())
323326
324327 By ("verifying that the returned pods have correct restart policy" )
325328 Expect (listObj .Items ).NotTo (BeEmpty ())
0 commit comments