move Taint and toleration predicate to its Score plugin

This commit is contained in:
SataQiu
2019-12-24 19:22:12 +08:00
parent 39d0710a4b
commit 21c916c3d2
13 changed files with 115 additions and 342 deletions

View File

@@ -138,30 +138,27 @@ func TestPriorityMetadata(t *testing.T) {
{
pod: podWithTolerationsAndAffinity,
expected: &priorityMetadata{
podLimits: nonPodLimits,
podTolerations: tolerations,
affinity: podAffinity,
podSelector: labels.NewSelector(),
podLimits: nonPodLimits,
affinity: podAffinity,
podSelector: labels.NewSelector(),
},
name: "Produce a priorityMetadata with default requests",
},
{
pod: podWithTolerationsAndRequests,
expected: &priorityMetadata{
podLimits: nonPodLimits,
podTolerations: tolerations,
affinity: nil,
podSelector: labels.NewSelector(),
podLimits: nonPodLimits,
affinity: nil,
podSelector: labels.NewSelector(),
},
name: "Produce a priorityMetadata with tolerations and requests",
},
{
pod: podWithAffinityAndRequests,
expected: &priorityMetadata{
podLimits: specifiedPodLimits,
podTolerations: nil,
affinity: podAffinity,
podSelector: labels.NewSelector(),
podLimits: specifiedPodLimits,
affinity: podAffinity,
podSelector: labels.NewSelector(),
},
name: "Produce a priorityMetadata with affinity and requests",
},