Merge pull request #27900 from derekwaynecarr/test_defaults_qos

Automatic merge from submit-queue

Add additional testing scenarios for compute resource requests=0

I was asked about the qos tier of a pod that specified 

`--requests=cpu=0,memory=0 --limits=cpu=100m,memory=1Gi`

and in just investigating current behavior, realized we should have an explicit test case to ensure that 0 values are preserved in defaulting passes, and that this is still a burstable pod (but the lowest for that tier as it related to eviction)

/cc @vishh
This commit is contained in:
k8s-merge-robot
2016-07-01 16:16:23 -07:00
committed by GitHub
2 changed files with 17 additions and 6 deletions

View File

@@ -123,6 +123,12 @@ func TestGetPodQOS(t *testing.T) {
}),
expected: Burstable,
},
{
pod: newPod("burstable", []api.Container{
newContainer("burstable", getResourceList("0", "0"), getResourceList("100m", "200Mi")),
}),
expected: Burstable,
},
}
for _, testCase := range testCases {
if actual := GetPodQOS(testCase.pod); testCase.expected != actual {