e2e: node: podresources: exercise with dynamicresources enabled

Differently than all the other tests, the testsuite
`TestListPodResourcesUsesOnlyActivePodsV1` did not enable
the `KubeletPodResourcesDynamicResources` FG.

This was just an oversight, because the test doesn't care
about the DynamicResources data, so the enablement was forgot.

We add the setting to make the tests consistent.

Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
Francesco Romani
2025-07-23 15:33:22 +02:00
parent c3f5bea6e7
commit 17cc5e9ecd

View File

@@ -294,6 +294,8 @@ func collectNamespacedNamesFromPodResources(prs []*podresourcesapi.PodResources)
}
func TestListPodResourcesUsesOnlyActivePodsV1(t *testing.T) {
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.KubeletPodResourcesDynamicResources, true)
tCtx := ktesting.Init(t)
numaID := int64(1)
@@ -385,6 +387,7 @@ func TestListPodResourcesUsesOnlyActivePodsV1(t *testing.T) {
mockCPUsProvider.EXPECT().GetAllocatableCPUs().Return([]int64{}).Maybe()
mockDevicesProvider.EXPECT().GetAllocatableDevices().Return([]*podresourcesapi.ContainerDevices{}).Maybe()
mockMemoryProvider.EXPECT().GetAllocatableMemory().Return([]*podresourcesapi.ContainerMemory{}).Maybe()
mockDynamicResourcesProvider.EXPECT().GetDynamicResources(mock.Anything, mock.Anything).Return([]*podresourcesapi.DynamicResource{}).Maybe()
providers := PodResourcesProviders{
Pods: mockPodsProvider,