Update use of Quantity in other classes

This commit is contained in:
Clayton Coleman
2016-05-17 00:36:56 -04:00
parent b2a01d4d94
commit 5e4308f91d
37 changed files with 204 additions and 242 deletions

View File

@@ -32,10 +32,10 @@ func TestResourceHelpers(t *testing.T) {
"kube.io/storage": memoryLimit,
},
}
if res := resourceSpec.Limits.Cpu(); *res != cpuLimit {
if res := resourceSpec.Limits.Cpu(); res.Cmp(cpuLimit) != 0 {
t.Errorf("expected cpulimit %v, got %v", cpuLimit, res)
}
if res := resourceSpec.Limits.Memory(); *res != memoryLimit {
if res := resourceSpec.Limits.Memory(); res.Cmp(memoryLimit) != 0 {
t.Errorf("expected memorylimit %v, got %v", memoryLimit, res)
}
resourceSpec = ResourceRequirements{
@@ -47,7 +47,7 @@ func TestResourceHelpers(t *testing.T) {
if res := resourceSpec.Limits.Cpu(); res.Value() != 0 {
t.Errorf("expected cpulimit %v, got %v", 0, res)
}
if res := resourceSpec.Limits.Memory(); *res != memoryLimit {
if res := resourceSpec.Limits.Memory(); res.Cmp(memoryLimit) != 0 {
t.Errorf("expected memorylimit %v, got %v", memoryLimit, res)
}
}