mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
remove redundant error test case in autoscaling validation
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
a7c69bd5fe
commit
dafdd01af3
@ -321,32 +321,6 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
|
|||||||
},
|
},
|
||||||
msg: "must be greater than or equal to `minReplicas`",
|
msg: "must be greater than or equal to `minReplicas`",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{
|
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
|
||||||
Name: "myautoscaler",
|
|
||||||
Namespace: metav1.NamespaceDefault,
|
|
||||||
},
|
|
||||||
Spec: autoscaling.HorizontalPodAutoscalerSpec{
|
|
||||||
ScaleTargetRef: autoscaling.CrossVersionObjectReference{
|
|
||||||
Kind: "ReplicationController",
|
|
||||||
Name: "myrc",
|
|
||||||
},
|
|
||||||
MinReplicas: newInt32(1),
|
|
||||||
MaxReplicas: 5,
|
|
||||||
Metrics: []autoscaling.MetricSpec{
|
|
||||||
{
|
|
||||||
Type: autoscaling.ResourceMetricSourceType,
|
|
||||||
Resource: &autoscaling.ResourceMetricSource{
|
|
||||||
Name: api.ResourceCPU,
|
|
||||||
TargetAverageUtilization: newInt32(-70),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
msg: "must be greater than 0",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{
|
horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user