You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wantStatus: framework.NewNonErrorStatus(framework.ClusterUnschedulable, p.Name(), "cluster does not match with any of the required cluster affinity terms"),
758
758
},
759
+
}
760
+
761
+
for_, tc:=rangetestCases {
762
+
t.Run(tc.name, func(t*testing.T) {
763
+
ctx:=context.Background()
764
+
state:=framework.NewCycleState(nil, nil, nil)
765
+
status:=p.Filter(ctx, state, tc.ps, tc.cluster)
766
+
767
+
ifdiff:=cmp.Diff(
768
+
status, tc.wantStatus,
769
+
cmp.AllowUnexported(framework.Status{}),
770
+
ignoreStatusErrorField,
771
+
); diff!="" {
772
+
t.Errorf("Filter() unexpected status (-got, +want):\n%s", diff)
773
+
}
774
+
})
775
+
}
776
+
}
777
+
778
+
funcTestFilter_PropertyChecker(t*testing.T) {
779
+
// This test ensures that the property checker is invoked correctly.
wantStatus: framework.NewNonErrorStatus(framework.ClusterUnschedulable, p.Name(), "cluster does not match with any of the required cluster affinity terms"),
879
+
vmSize: "Standard_B2ms",
880
+
targetCapacity: 3,
881
+
wantStatus: framework.NewNonErrorStatus(framework.ClusterUnschedulable, p.Name(), "cluster does not match with any of the required cluster affinity terms"),
0 commit comments