Skip to content

Commit bab6df8

Browse files
committed
Add resize e2e tests around min CPU shares
1 parent 5a3a40c commit bab6df8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test/e2e/common/node/pod_resize.go

+34
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,24 @@ func doPodResizeTests(f *framework.Framework) {
566566
},
567567
},
568568
},
569+
{
570+
name: "Burstable QoS pod, one container with cpu requests - resize with equivalent request",
571+
containers: []e2epod.ResizableContainerInfo{
572+
{
573+
Name: "c1",
574+
Resources: &e2epod.ContainerResources{CPUReq: "2m"},
575+
},
576+
},
577+
patchString: `{"spec":{"containers":[
578+
{"name":"c1", "resources":{"requests":{"cpu":"1m"}}}
579+
]}}`,
580+
expected: []e2epod.ResizableContainerInfo{
581+
{
582+
Name: "c1",
583+
Resources: &e2epod.ContainerResources{CPUReq: "1m"},
584+
},
585+
},
586+
},
569587
{
570588
name: "Guaranteed QoS pod, one container - increase CPU (NotRequired) & memory (RestartContainer)",
571589
testRollback: true,
@@ -783,6 +801,22 @@ func doPodResizeTests(f *framework.Framework) {
783801
},
784802
addExtendedResource: true,
785803
},
804+
{
805+
name: "BestEffort QoS pod - empty resize",
806+
containers: []e2epod.ResizableContainerInfo{
807+
{
808+
Name: "c1",
809+
Resources: &e2epod.ContainerResources{},
810+
},
811+
},
812+
patchString: `{}`,
813+
expected: []e2epod.ResizableContainerInfo{
814+
{
815+
Name: "c1",
816+
Resources: &e2epod.ContainerResources{},
817+
},
818+
},
819+
},
786820
}
787821

788822
for idx := range tests {

0 commit comments

Comments
 (0)