skip pod resource check when request is zero

Signed-off-by: forrestchen <forrestchen@tencent.com>
This commit is contained in:
forrestchen
2023-03-09 17:05:11 +08:00
parent f5ddaa152e
commit bbf2b968c8
2 changed files with 15 additions and 3 deletions

View File

@@ -473,6 +473,17 @@ func TestEnoughRequests(t *testing.T) {
name: "skip checking extended resource request with quantity zero via resource groups",
wantInsufficientResources: []InsufficientResource{},
},
{
pod: newResourcePod(
framework.Resource{
ScalarResources: map[v1.ResourceName]int64{
extendedResourceA: 1,
}}),
nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{
MilliCPU: 20, Memory: 30, ScalarResources: map[v1.ResourceName]int64{extendedResourceA: 1}})),
name: "skip checking resource request with quantity zero",
wantInsufficientResources: []InsufficientResource{},
},
}
for _, test := range enoughPodsTests {