Commit 092c1b46 authored by gmarek's avatar gmarek

Make scheduler predicates test correctly use request instead of a limit

parent 81b6ac47
......@@ -89,7 +89,7 @@ func startPods(c *client.Client, replicas int, ns string, podNamePrefix string,
func getRequestedCPU(pod api.Pod) int64 {
var result int64
for _, container := range pod.Spec.Containers {
result += container.Resources.Limits.Cpu().MilliValue()
result += container.Resources.Requests.Cpu().MilliValue()
}
return result
}
......@@ -312,6 +312,9 @@ var _ = Describe("SchedulerPredicates", func() {
Limits: api.ResourceList{
"cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"),
},
Requests: api.ResourceList{
"cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"),
},
},
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment