From 75258b2763191f0de7a23f2de5075f33ae61e9d5 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 10 Aug 2017 11:45:09 +0800 Subject: [PATCH] update testcase err msg --- pkg/api/validation/validation_test.go | 2 +- pkg/quota/evaluator/core/pods_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 11264423d1..400dc4a84e 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -5060,7 +5060,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid opaque integer resource requirement: request must be <= limit": { - expectedError: "must be greater than or equal to pod.alpha.kubernetes.io/opaque-int-resource-A", + expectedError: "must be less than or equal to pod.alpha.kubernetes.io/opaque-int-resource-A", spec: api.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ diff --git a/pkg/quota/evaluator/core/pods_test.go b/pkg/quota/evaluator/core/pods_test.go index b947e1f322..061aa32583 100644 --- a/pkg/quota/evaluator/core/pods_test.go +++ b/pkg/quota/evaluator/core/pods_test.go @@ -42,7 +42,7 @@ func TestPodConstraintsFunc(t *testing.T) { }}, }, }, - err: `spec.initContainers[0].resources.limits: Invalid value: "1m": must be greater than or equal to cpu request`, + err: `spec.initContainers[0].resources.requests: Invalid value: "2m": must be less than or equal to cpu limit`, }, "container resource invalid": { pod: &api.Pod{ @@ -55,7 +55,7 @@ func TestPodConstraintsFunc(t *testing.T) { }}, }, }, - err: `spec.containers[0].resources.limits: Invalid value: "1m": must be greater than or equal to cpu request`, + err: `spec.containers[0].resources.requests: Invalid value: "2m": must be less than or equal to cpu limit`, }, "init container resource missing": { pod: &api.Pod{