@@ -27,6 +27,8 @@ import (
27
27
"testing"
28
28
"time"
29
29
30
+ "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions"
31
+
30
32
v1 "k8s.io/api/core/v1"
31
33
"k8s.io/apimachinery/pkg/api/resource"
32
34
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -1903,7 +1905,7 @@ func TestNodesWherePreemptionMightHelp(t *testing.T) {
1903
1905
name : "Mix of failed predicates works fine" ,
1904
1906
nodesStatuses : framework.NodeToStatusMap {
1905
1907
"machine1" : framework .NewStatus (framework .UnschedulableAndUnresolvable , algorithmpredicates .ErrNodeUnderDiskPressure .GetReason ()),
1906
- "machine2" : framework .NewStatus (framework .UnschedulableAndUnresolvable , algorithmpredicates . ErrDiskConflict . GetReason () ),
1908
+ "machine2" : framework .NewStatus (framework .UnschedulableAndUnresolvable , volumerestrictions . ErrReasonDiskConflict ),
1907
1909
"machine3" : framework .NewStatus (framework .Unschedulable , algorithmpredicates .NewInsufficientResourceError (v1 .ResourceMemory , 1000 , 600 , 400 ).GetReason ()),
1908
1910
},
1909
1911
expected : map [string ]bool {"machine3" : true , "machine4" : true },
@@ -1976,7 +1978,7 @@ func TestNodesWherePreemptionMightHelp(t *testing.T) {
1976
1978
func TestPreempt (t * testing.T ) {
1977
1979
defaultFailedNodeToStatusMap := framework.NodeToStatusMap {
1978
1980
"machine1" : framework .NewStatus (framework .Unschedulable , algorithmpredicates .NewInsufficientResourceError (v1 .ResourceMemory , 1000 , 500 , 300 ).GetReason ()),
1979
- "machine2" : framework .NewStatus (framework .Unschedulable , algorithmpredicates . ErrDiskConflict . GetReason () ),
1981
+ "machine2" : framework .NewStatus (framework .Unschedulable , volumerestrictions . ErrReasonDiskConflict ),
1980
1982
"machine3" : framework .NewStatus (framework .Unschedulable , algorithmpredicates .NewInsufficientResourceError (v1 .ResourceMemory , 1000 , 600 , 400 ).GetReason ()),
1981
1983
}
1982
1984
// Prepare 3 node names.
0 commit comments