Skip to content

Commit

Permalink
give an annotation to HPAs in test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho committed Oct 11, 2023
1 parent e40b3dc commit 7b39751
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions pkg/hpa/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,11 @@ func TestService_UpdateHPASpecFromTortoiseAutoscalingPolicy(t *testing.T) {
},
initialHPA: &v2.HorizontalPodAutoscaler{
ObjectMeta: metav1.ObjectMeta{
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{},
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{
annotation.ManagedByTortoiseAnnotation: "true",
},
},
Spec: v2.HorizontalPodAutoscalerSpec{
MinReplicas: ptrInt32(1),
Expand Down Expand Up @@ -1265,6 +1267,9 @@ func TestService_UpdateHPASpecFromTortoiseAutoscalingPolicy(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{
annotation.ManagedByTortoiseAnnotation: "true",
},
},
Spec: v2.HorizontalPodAutoscalerSpec{
MinReplicas: ptrInt32(1),
Expand Down Expand Up @@ -1391,9 +1396,11 @@ func TestService_UpdateHPASpecFromTortoiseAutoscalingPolicy(t *testing.T) {
},
initialHPA: &v2.HorizontalPodAutoscaler{
ObjectMeta: metav1.ObjectMeta{
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{},
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{
annotation.ManagedByTortoiseAnnotation: "true",
},
},
Spec: v2.HorizontalPodAutoscalerSpec{
MinReplicas: ptrInt32(1),
Expand Down Expand Up @@ -1496,6 +1503,9 @@ func TestService_UpdateHPASpecFromTortoiseAutoscalingPolicy(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "hpa",
Namespace: "default",
Annotations: map[string]string{
annotation.ManagedByTortoiseAnnotation: "true",
},
},
Spec: v2.HorizontalPodAutoscalerSpec{
MinReplicas: ptrInt32(1),
Expand Down

0 comments on commit 7b39751

Please sign in to comment.