mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 02:06:23 +00:00
test fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user