mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user