File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -409,13 +409,18 @@ func TestCleanUpAllBindingsForWithInterface(t *testing.T) {
409409 }
410410
411411 // Verify bindings were cleaned up
412- bindingList := & fleetv1beta1.ClusterResourceBindingList {}
412+ var bindingList fleetv1beta1.BindingObjList
413+ if placement .GetNamespace () == "" {
414+ bindingList = & fleetv1beta1.ClusterResourceBindingList {}
415+ } else {
416+ bindingList = & fleetv1beta1.ResourceBindingList {}
417+ }
413418 if err := fakeClient .List (ctx , bindingList ); err != nil {
414419 t .Fatalf ("List() bindings = %v, want no error" , err )
415420 }
416421
417- if len (bindingList .Items ) != 0 {
418- t .Errorf ("binding list length = %d, want 0" , len (bindingList .Items ))
422+ if len (bindingList .GetBindingObjs () ) != 0 {
423+ t .Errorf ("binding list length = %d, want 0" , len (bindingList .GetBindingObjs () ))
419424 }
420425 })
421426 }
You can’t perform that action at this time.
0 commit comments