mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Add test case in scheduler/util/non_zero_test.go to improve the test coverage.
This commit is contained in:
parent
7b20442513
commit
e16c4f22dd
@ -123,6 +123,20 @@ func TestGetLeastRequestResource(t *testing.T) {
|
|||||||
v1.ResourceMemory,
|
v1.ResourceMemory,
|
||||||
400 * 1024 * 1024,
|
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 {
|
for _, test := range tests {
|
||||||
|
Loading…
Reference in New Issue
Block a user