mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #18218 from gmarek/fix-test
Make scheduler predicates test correctly use request instead of a limit
This commit is contained in:
commit
c1828b3153
@ -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"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user