Add test case in scheduler/util/non_zero_test.go to improve the test coverage.

This commit is contained in:
Kobayashi Daisuke 2020-04-09 17:42:43 +09:00
parent 7b20442513
commit e16c4f22dd

View File

@ -123,6 +123,20 @@ func TestGetLeastRequestResource(t *testing.T) {
v1.ResourceMemory,
400 * 1024 * 1024,
},
{
"ephemeralStorage_exist",
v1.ResourceList{
v1.ResourceEphemeralStorage: resource.MustParse("400Mi"),
},
v1.ResourceEphemeralStorage,
400 * 1024 * 1024,
},
{
"ephemeralStorage_not_found",
v1.ResourceList{},
v1.ResourceEphemeralStorage,
0,
},
}
for _, test := range tests {