Move GetPodPriority from /scheduler/util to /api/pod

This commit is contained in:
Harsh Singh
2019-09-17 23:49:56 +05:30
parent 946350d99e
commit 6a9ef7f04f
13 changed files with 91 additions and 85 deletions

View File

@@ -157,8 +157,8 @@ type fakeFramework struct{}
func (*fakeFramework) QueueSortFunc() framework.LessFunc {
return func(podInfo1, podInfo2 *framework.PodInfo) bool {
prio1 := util.GetPodPriority(podInfo1.Pod)
prio2 := util.GetPodPriority(podInfo2.Pod)
prio1 := podutil.GetPodPriority(podInfo1.Pod)
prio2 := podutil.GetPodPriority(podInfo2.Pod)
return prio1 < prio2
}
}
@@ -855,7 +855,7 @@ func TestPodFailedSchedulingMultipleTimesDoesNotBlockNewerPod(t *testing.T) {
// Add an unschedulable pod to a priority queue.
// This makes a situation that the pod was tried to schedule
// and had been determined unschedulable so far.
// and had been determined unschedulable so far
unschedulablePod := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-unscheduled",