Update pkg/kubelet/kubelet_test.go

Co-authored-by: Natasha Sarkar <natashasarkar@google.com>
This commit is contained in:
Sotiris Salloumis
2025-06-04 20:36:15 +02:00
committed by GitHub
parent 4c7840ec5d
commit f8b893489c

View File

@@ -2427,7 +2427,8 @@ func TestPodResourceAllocationReset(t *testing.T) {
defer testKubelet.Cleanup()
kubelet := testKubelet.kubelet
// fakePodWorkers trigger syncPodFn synchronously on update
// fakePodWorkers triggers syncPodFn synchronously on update. We overwrite it here to
// avoid calling kubelet.SyncPod, which performs resize resource allocation.
kubelet.podWorkers.(*fakePodWorkers).syncPodFn =
func(_ context.Context, _ kubetypes.SyncPodType, _, _ *v1.Pod, _ *kubecontainer.PodStatus) (bool, error) {
return false, nil