mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	HorizontalPodAutoscaler status
This commit is contained in:
		@@ -38,7 +38,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				MinCount: 1,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
@@ -60,7 +60,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				MinCount: -1,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		"must be bigger or equal to minCount": {
 | 
			
		||||
@@ -74,7 +74,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				MinCount: 7,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		"invalid value": {
 | 
			
		||||
@@ -88,7 +88,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				MinCount: 1,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("-0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("-0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		"resource not supported": {
 | 
			
		||||
@@ -102,7 +102,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				MinCount: 1,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceName("NotSupportedResource"), Quantity: resource.MustParse("0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceName("NotSupportedResource"), Quantity: resource.MustParse("0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		"required value": {
 | 
			
		||||
@@ -113,7 +113,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) {
 | 
			
		||||
			Spec: expapi.HorizontalPodAutoscalerSpec{
 | 
			
		||||
				MinCount: 1,
 | 
			
		||||
				MaxCount: 5,
 | 
			
		||||
				Target:   expapi.TargetConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
				Target:   expapi.ResourceConsumption{Resource: api.ResourceCPU, Quantity: resource.MustParse("0.8")},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user