Add resize e2e tests around min CPU shares

This commit is contained in:
Tim Allclair 2024-11-06 23:30:28 -08:00
parent 5a3a40cd19
commit bab6df857c

View File

@ -566,6 +566,24 @@ func doPodResizeTests(f *framework.Framework) {
},
},
},
{
name: "Burstable QoS pod, one container with cpu requests - resize with equivalent request",
containers: []e2epod.ResizableContainerInfo{
{
Name: "c1",
Resources: &e2epod.ContainerResources{CPUReq: "2m"},
},
},
patchString: `{"spec":{"containers":[
{"name":"c1", "resources":{"requests":{"cpu":"1m"}}}
]}}`,
expected: []e2epod.ResizableContainerInfo{
{
Name: "c1",
Resources: &e2epod.ContainerResources{CPUReq: "1m"},
},
},
},
{
name: "Guaranteed QoS pod, one container - increase CPU (NotRequired) & memory (RestartContainer)",
testRollback: true,
@ -783,6 +801,22 @@ func doPodResizeTests(f *framework.Framework) {
},
addExtendedResource: true,
},
{
name: "BestEffort QoS pod - empty resize",
containers: []e2epod.ResizableContainerInfo{
{
Name: "c1",
Resources: &e2epod.ContainerResources{},
},
},
patchString: `{}`,
expected: []e2epod.ResizableContainerInfo{
{
Name: "c1",
Resources: &e2epod.ContainerResources{},
},
},
},
}
for idx := range tests {