@@ -806,7 +806,7 @@ func TestPreFilterState(t *testing.T) {
806
806
{
807
807
name : "NodeAffinityPolicy honored with nodeAffinity" ,
808
808
pod : st .MakePod ().Name ("p" ).Label ("foo" , "" ).
809
- NodeAffinityIn ("foo" , []string {"" }).
809
+ NodeAffinityIn ("foo" , []string {"" }, st . NodeSelectorTypeMatchExpressions ).
810
810
SpreadConstraint (1 , "node" , v1 .DoNotSchedule , barSelector , nil , nil , nil , nil ).
811
811
Obj (),
812
812
nodes : []* v1.Node {
@@ -845,7 +845,7 @@ func TestPreFilterState(t *testing.T) {
845
845
{
846
846
name : "NodeAffinityPolicy ignored with nodeAffinity" ,
847
847
pod : st .MakePod ().Name ("p" ).Label ("foo" , "" ).
848
- NodeAffinityIn ("foo" , []string {"" }).
848
+ NodeAffinityIn ("foo" , []string {"" }, st . NodeSelectorTypeMatchExpressions ).
849
849
SpreadConstraint (1 , "node" , v1 .DoNotSchedule , barSelector , nil , & ignorePolicy , nil , nil ).
850
850
Obj (),
851
851
nodes : []* v1.Node {
@@ -2708,7 +2708,7 @@ func TestSingleConstraint(t *testing.T) {
2708
2708
// the fact that node-a fits can prove the underlying logic works
2709
2709
name : "incoming pod has nodeAffinity, pods spread as 2/~1~/~0~/3, hence node-a fits" ,
2710
2710
pod : st .MakePod ().Name ("p" ).Label ("foo" , "" ).
2711
- NodeAffinityIn ("node" , []string {"node-a" , "node-y" }).
2711
+ NodeAffinityIn ("node" , []string {"node-a" , "node-y" }, st . NodeSelectorTypeMatchExpressions ).
2712
2712
SpreadConstraint (1 , "node" , v1 .DoNotSchedule , fooSelector , nil , nil , nil , nil ).
2713
2713
Obj (),
2714
2714
nodes : []* v1.Node {
@@ -2951,7 +2951,7 @@ func TestSingleConstraint(t *testing.T) {
2951
2951
// pods spread across node as 1/1/0/~0~
2952
2952
name : "NodeAffinityPolicy honored with nodeAffinity" ,
2953
2953
pod : st .MakePod ().Name ("p" ).Label ("foo" , "" ).
2954
- NodeAffinityIn ("foo" , []string {"" }).
2954
+ NodeAffinityIn ("foo" , []string {"" }, st . NodeSelectorTypeMatchExpressions ).
2955
2955
SpreadConstraint (1 , "node" , v1 .DoNotSchedule , fooSelector , nil , nil , nil , nil ).
2956
2956
Obj (),
2957
2957
nodes : []* v1.Node {
@@ -2977,7 +2977,7 @@ func TestSingleConstraint(t *testing.T) {
2977
2977
// pods spread across node as 1/1/0/~1~
2978
2978
name : "NodeAffinityPolicy ignored with labelSelectors" ,
2979
2979
pod : st .MakePod ().Name ("p" ).Label ("foo" , "" ).
2980
- NodeAffinityIn ("foo" , []string {"" }).
2980
+ NodeAffinityIn ("foo" , []string {"" }, st . NodeSelectorTypeMatchExpressions ).
2981
2981
SpreadConstraint (1 , "node" , v1 .DoNotSchedule , fooSelector , nil , & ignorePolicy , nil , nil ).
2982
2982
Obj (),
2983
2983
nodes : []* v1.Node {
0 commit comments