Merge pull request #131518 from kevinrizza/pod-resize-test-namespace

Don't create extra namespaces during pod resize tests
This commit is contained in:
Kubernetes Prow Robot
2025-04-29 09:18:02 -07:00
committed by GitHub
2 changed files with 6 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ func offsetMemory(index int64, value string) string {
return ptr.String()
}
func doPodResizeTests() {
func doPodResizeTests(f *framework.Framework) {
type testCase struct {
name string
containers []podresize.ResizableContainerInfo
@@ -1157,7 +1157,6 @@ func doPodResizeTests() {
for idx := range tests {
tc := tests[idx]
f := framework.NewDefaultFramework("pod-resize-tests")
ginkgo.It(tc.name, func(ctx context.Context) {
podClient := e2epod.NewPodClient(f)
@@ -1235,7 +1234,7 @@ func doPodResizeTests() {
}
}
func doPodResizeErrorTests() {
func doPodResizeErrorTests(f *framework.Framework) {
type testCase struct {
name string
@@ -1390,7 +1389,6 @@ func doPodResizeErrorTests() {
for idx := range tests {
tc := tests[idx]
f := framework.NewDefaultFramework("pod-resize-error-tests")
ginkgo.It(tc.name, func(ctx context.Context) {
podClient := e2epod.NewPodClient(f)
@@ -1453,6 +1451,6 @@ var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithFeatureGate(fe
}
})
doPodResizeTests()
doPodResizeErrorTests()
doPodResizeTests(f)
doPodResizeErrorTests(f)
})

View File

@@ -40,7 +40,7 @@ import (
"github.com/onsi/gomega"
)
func doPodResizeAdmissionPluginsTests() {
func doPodResizeAdmissionPluginsTests(f *framework.Framework) {
testcases := []struct {
name string
enableAdmissionPlugin func(ctx context.Context, f *framework.Framework)
@@ -119,8 +119,6 @@ func doPodResizeAdmissionPluginsTests() {
}
for _, tc := range testcases {
f := framework.NewDefaultFramework(tc.name)
ginkgo.It(tc.name, func(ctx context.Context) {
containers := []podresize.ResizableContainerInfo{
{
@@ -459,7 +457,7 @@ var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithFeatureGate(fe
e2eskipper.Skipf("runtime does not support InPlacePodVerticalScaling -- skipping")
}
})
doPodResizeAdmissionPluginsTests()
doPodResizeAdmissionPluginsTests(f)
})
func waitForResourceQuota(ctx context.Context, c clientset.Interface, ns, quotaName string) error {