Skip to content

Commit

Permalink
Add resize e2e tests around min CPU shares
Browse files Browse the repository at this point in the history
  • Loading branch information
tallclair committed Nov 8, 2024
1 parent 5a3a40c commit bab6df8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/e2e/common/node/pod_resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit bab6df8

Please sign in to comment.