diff --git a/test/e2e/common/node/pod_resize.go b/test/e2e/common/node/pod_resize.go index 3c0cae3d88d..2109439ceb9 100644 --- a/test/e2e/common/node/pod_resize.go +++ b/test/e2e/common/node/pod_resize.go @@ -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) }) diff --git a/test/e2e/node/pod_resize.go b/test/e2e/node/pod_resize.go index d460b94820c..68f859bf51d 100644 --- a/test/e2e/node/pod_resize.go +++ b/test/e2e/node/pod_resize.go @@ -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 {