@@ -349,12 +349,12 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
349
349
framework .Logf ("TEST2: Pod '%s' CPU requests '%dm'" , testPod3 .Name , testPod3 .Spec .Containers [0 ].Resources .Requests .Cpu ().MilliValue ())
350
350
framework .ExpectNoError (e2epod .WaitForPodRunningInNamespace (ctx , f .ClientSet , testPod3 ))
351
351
352
- // Scheduler focssed pod resize E2E test case #3
352
+ // Scheduler focused pod resize E2E test case #3
353
353
// 1. With pod1 + pod2 + pod3 running on node above, attempt to scale up pod1 to requests more CPU than available, verify deferred.
354
354
// 2. Delete pod2 + pod3 to make room for pod3.
355
355
// 3. Verify that pod1 resize has completed.
356
356
// 4. Attempt to scale up pod1 to request more cpu than the node has, verify infeasible.
357
- patchTestpod1ExceedNodeCapacity := fmt .Sprintf (`{
357
+ patchTestpod1ExceedNodeAvailable := fmt .Sprintf (`{
358
358
"spec": {
359
359
"containers": [
360
360
{
@@ -365,8 +365,8 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
365
365
}
366
366
}` , testPod1CPUQuantity .MilliValue (), testPod1CPUQuantity .MilliValue ())
367
367
368
- testPod1CPUQuantityResizedAgain := resource .NewMilliQuantity (nodeAvailableMilliCPU * 2 , resource .DecimalSI )
369
- patchTestpod1AgainExceedNodeCapacity := fmt .Sprintf (`{
368
+ testPod1CPUExceedingAllocatable := resource .NewMilliQuantity (nodeAllocatableMilliCPU * 2 , resource .DecimalSI )
369
+ patchTestpod1ExceedNodeAllocatable := fmt .Sprintf (`{
370
370
"spec": {
371
371
"containers": [
372
372
{
@@ -375,11 +375,11 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
375
375
}
376
376
]
377
377
}
378
- }` , testPod1CPUQuantityResizedAgain .MilliValue (), testPod1CPUQuantityResizedAgain .MilliValue ())
378
+ }` , testPod1CPUExceedingAllocatable .MilliValue (), testPod1CPUExceedingAllocatable .MilliValue ())
379
379
380
- ginkgo .By (fmt .Sprintf ("TEST3: Resize pod '%s' exceed node capacity" , testPod1 .Name ))
380
+ ginkgo .By (fmt .Sprintf ("TEST3: Resize pod '%s' exceed node available capacity" , testPod1 .Name ))
381
381
testPod1 , p1Err = f .ClientSet .CoreV1 ().Pods (testPod1 .Namespace ).Patch (ctx ,
382
- testPod1 .Name , types .StrategicMergePatchType , []byte (patchTestpod1ExceedNodeCapacity ), metav1.PatchOptions {}, "resize" )
382
+ testPod1 .Name , types .StrategicMergePatchType , []byte (patchTestpod1ExceedNodeAvailable ), metav1.PatchOptions {}, "resize" )
383
383
framework .ExpectNoError (p1Err , "failed to patch pod for resize" )
384
384
gomega .Expect (testPod1 .Generation ).To (gomega .BeEquivalentTo (3 ))
385
385
framework .ExpectNoError (e2epod .WaitForPodCondition (ctx , f .ClientSet , testPod1 .Namespace , testPod1 .Name , "display pod resize status as deferred" , f .Timeouts .PodStart , func (pod * v1.Pod ) (bool , error ) {
@@ -404,7 +404,7 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
404
404
405
405
ginkgo .By (fmt .Sprintf ("TEST3: Resize pod '%s' to exceed the node capacity" , testPod1 .Name ))
406
406
testPod1 , p1Err = f .ClientSet .CoreV1 ().Pods (testPod1 .Namespace ).Patch (ctx ,
407
- testPod1 .Name , types .StrategicMergePatchType , []byte (patchTestpod1AgainExceedNodeCapacity ), metav1.PatchOptions {}, "resize" )
407
+ testPod1 .Name , types .StrategicMergePatchType , []byte (patchTestpod1ExceedNodeAllocatable ), metav1.PatchOptions {}, "resize" )
408
408
framework .ExpectNoError (p1Err , "failed to patch pod for resize" )
409
409
gomega .Expect (testPod1 .Generation ).To (gomega .BeEquivalentTo (4 ))
410
410
framework .ExpectNoError (e2epod .WaitForPodCondition (ctx , f .ClientSet , testPod1 .Namespace , testPod1 .Name , "display pod resize status as infeasible" , f .Timeouts .PodStart , func (pod * v1.Pod ) (bool , error ) {
0 commit comments