From ec6d65e33397e0739800a64d0fb32f8f9407b045 Mon Sep 17 00:00:00 2001 From: ndixita Date: Thu, 19 Mar 2026 21:21:39 +0000 Subject: [PATCH] test fixes --- test/e2e/common/node/framework/podresize/resize.go | 5 ----- test/e2e/common/node/pod_level_resources_resize.go | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/e2e/common/node/framework/podresize/resize.go b/test/e2e/common/node/framework/podresize/resize.go index c1888449d9c..5065883f62b 100644 --- a/test/e2e/common/node/framework/podresize/resize.go +++ b/test/e2e/common/node/framework/podresize/resize.go @@ -383,11 +383,6 @@ func WaitForPodResizeActuation(ctx context.Context, f *framework.Framework, podC }, nil } - if resourceErrs := VerifyPodStatusResources(pod, expectedContainers); resourceErrs != nil { - return func() string { - return fmt.Sprintf("container status resources don't match expected: %v", formatErrors(resourceErrs)) - }, nil - } // Wait for kubelet to clear the resize status conditions. for _, c := range pod.Status.Conditions { if c.Type == v1.PodResizePending || c.Type == v1.PodResizeInProgress { diff --git a/test/e2e/common/node/pod_level_resources_resize.go b/test/e2e/common/node/pod_level_resources_resize.go index f71c166ce9b..a1e404516dc 100644 --- a/test/e2e/common/node/pod_level_resources_resize.go +++ b/test/e2e/common/node/pod_level_resources_resize.go @@ -27,7 +27,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/kubernetes/pkg/features" @@ -72,7 +71,9 @@ func doGuaranteedPodLevelResizeTests(f *framework.Framework) { expectedContainers := makeGuaranteedContainers(1, cpuPolicy, memPolicy, true, true, desiredCtrCPU, desiredCtrMem) for i, c := range expectedContainers { // If the pod has init containers, but we are not resizing them, keep the original resources. - if c.InitCtr && !resizeInitCtrs { + podLevelOnly := (desiredCtrCPU == "" && desiredPodCPU != originalCPU) || (desiredCtrMem == "" && desiredPodMem != originalMem) + + if c.InitCtr && !resizeInitCtrs && !podLevelOnly { c.Resources = originalContainers[i].Resources expectedContainers[i] = c continue