@@ -1319,16 +1319,20 @@ var _ = Describe("Fake client", func() {
13191319 listOpts := & client.ListOptions {
13201320 FieldSelector : fields .OneTermEqualSelector ("key" , "val" ),
13211321 }
1322- err := cl .List (context .Background (), & corev1.ConfigMapList {}, listOpts )
1322+ list := & corev1.ConfigMapList {}
1323+ err := cl .List (context .Background (), list , listOpts )
13231324 Expect (err ).To (HaveOccurred ())
1325+ Expect (list .Items ).To (BeEmpty ())
13241326 })
13251327
13261328 It ("errors when there's no Index matching the field name" , func () {
13271329 listOpts := & client.ListOptions {
13281330 FieldSelector : fields .OneTermEqualSelector ("spec.paused" , "false" ),
13291331 }
1330- err := cl .List (context .Background (), & appsv1.DeploymentList {}, listOpts )
1332+ list := & appsv1.DeploymentList {}
1333+ err := cl .List (context .Background (), list , listOpts )
13311334 Expect (err ).To (HaveOccurred ())
1335+ Expect (list .Items ).To (BeEmpty ())
13321336 })
13331337
13341338 It ("errors when field selector uses two requirements" , func () {
@@ -1337,8 +1341,10 @@ var _ = Describe("Fake client", func() {
13371341 fields .OneTermEqualSelector ("spec.replicas" , "1" ),
13381342 fields .OneTermEqualSelector ("spec.strategy.type" , string (appsv1 .RecreateDeploymentStrategyType )),
13391343 )}
1340- err := cl .List (context .Background (), & appsv1.DeploymentList {}, listOpts )
1344+ list := & appsv1.DeploymentList {}
1345+ err := cl .List (context .Background (), list , listOpts )
13411346 Expect (err ).To (HaveOccurred ())
1347+ Expect (list .Items ).To (BeEmpty ())
13421348 })
13431349
13441350 It ("returns two deployments that match the only field selector requirement" , func () {
0 commit comments