From 092c1b46eea8b854be3e4711147a32be802741bc Mon Sep 17 00:00:00 2001 From: gmarek Date: Fri, 4 Dec 2015 18:15:23 +0100 Subject: [PATCH] Make scheduler predicates test correctly use request instead of a limit --- test/e2e/scheduler_predicates.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index 16c89b0c8ee..56ec26fb426 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -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"), + }, }, }, },