Commit 75258b27 authored by Di Xu's avatar Di Xu

update testcase err msg

parent fc0bdb56
...@@ -5060,7 +5060,7 @@ func TestValidatePod(t *testing.T) { ...@@ -5060,7 +5060,7 @@ func TestValidatePod(t *testing.T) {
}, },
}, },
"invalid opaque integer resource requirement: request must be <= limit": { "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{ spec: api.Pod{
ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"},
Spec: api.PodSpec{ Spec: api.PodSpec{
......
...@@ -42,7 +42,7 @@ func TestPodConstraintsFunc(t *testing.T) { ...@@ -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": { "container resource invalid": {
pod: &api.Pod{ pod: &api.Pod{
...@@ -55,7 +55,7 @@ func TestPodConstraintsFunc(t *testing.T) { ...@@ -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": { "init container resource missing": {
pod: &api.Pod{ pod: &api.Pod{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment