Break volumerestrictions Filter plugins dependency on predicates package

This commit is contained in:
Haosdent Huang
2020-01-06 02:56:55 +08:00
parent 862c8bf818
commit 9bcca31e52
7 changed files with 18 additions and 16 deletions

View File

@@ -43,7 +43,7 @@ func TestPredicateResultToFrameworkStatus(t *testing.T) {
{
name: "Error with reason",
err: errors.New("Failed with error"),
reasons: []predicates.PredicateFailureReason{predicates.ErrDiskConflict},
reasons: []predicates.PredicateFailureReason{predicates.ErrTaintsTolerationsNotMatch},
wantStatus: framework.NewStatus(framework.Error, "Failed with error"),
},
{
@@ -53,8 +53,8 @@ func TestPredicateResultToFrameworkStatus(t *testing.T) {
},
{
name: "Unschedulable and Unresolvable",
reasons: []predicates.PredicateFailureReason{predicates.ErrDiskConflict, predicates.ErrNodeSelectorNotMatch},
wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable, "node(s) had no available disk", "node(s) didn't match node selector"),
reasons: []predicates.PredicateFailureReason{predicates.ErrTaintsTolerationsNotMatch, predicates.ErrNodeSelectorNotMatch},
wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable, "node(s) had taints that the pod didn't tolerate", "node(s) didn't match node selector"),
},
}
for _, tt := range tests {