mirror of https://github.com/k3s-io/k3s
Merge pull request #60606 from jianglingxia/jlx-resourcequota2018
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add UT test to TestMax if equal scenario **What this PR does / why we need it**: Add UT test to TestMax if equal scenario :a == b return a or b **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/8/head
commit
5411352dc6
|
@ -102,6 +102,11 @@ func TestMax(t *testing.T) {
|
|||
b: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
|
||||
expected: api.ResourceList{api.ResourceCPU: resource.MustParse("150m")},
|
||||
},
|
||||
"matching-equal": {
|
||||
a: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
|
||||
b: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
|
||||
expected: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
|
||||
},
|
||||
}
|
||||
for testName, testCase := range testCases {
|
||||
sum := Max(testCase.a, testCase.b)
|
||||
|
|
Loading…
Reference in New Issue