Add UT test in qos if pod has one container

This commit is contained in:
jianglingxia 2018-02-26 19:05:51 +08:00
parent 15b7d4666d
commit 6b3a3452be

View File

@ -65,6 +65,12 @@ func TestGetPodQOS(t *testing.T) {
}),
expected: v1.PodQOSBestEffort,
},
{
pod: newPod("best-effort", []v1.Container{
newContainer("best-effort", getResourceList("", ""), getResourceList("", "")),
}),
expected: v1.PodQOSBestEffort,
},
{
pod: newPod("best-effort-best-effort-with-gpu", []v1.Container{
newContainer("best-effort", getResourceList("", ""), addResource("nvidia-gpu", "2", getResourceList("", ""))),