fix pod created failed when resource request is 0

This commit is contained in:
jlsong01
2022-07-29 23:23:25 +08:00
parent 3c1237930e
commit 27824fb06a
2 changed files with 19 additions and 0 deletions

View File

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