From 09ade1f5a2d49ebb86b922a19836083ba7f0c1cb Mon Sep 17 00:00:00 2001 From: aviadlevy Date: Thu, 16 Jun 2022 19:56:18 +0300 Subject: [PATCH] e2e - downgrade to autoscalingv2beta2 Signed-off-by: aviadlevy --- tests/helper.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/helper.go b/tests/helper.go index e546a9ca282..4f6630afcf5 100644 --- a/tests/helper.go +++ b/tests/helper.go @@ -13,7 +13,7 @@ import ( "github.com/joho/godotenv" "github.com/stretchr/testify/assert" - autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" @@ -137,11 +137,11 @@ func WaitForDeploymentReplicaCount(t *testing.T, kc *kubernetes.Clientset, name, } func WaitForHpaCreation(t *testing.T, kc *kubernetes.Clientset, name, namespace string, - iterations, intervalSeconds int) (*autoscalingv2.HorizontalPodAutoscaler, error) { - hpa := &autoscalingv2.HorizontalPodAutoscaler{} + iterations, intervalSeconds int) (*autoscalingv2beta2.HorizontalPodAutoscaler, error) { + hpa := &autoscalingv2beta2.HorizontalPodAutoscaler{} var err error for i := 0; i < iterations; i++ { - hpa, err = kc.AutoscalingV2().HorizontalPodAutoscalers(namespace).Get(context.Background(), name, metav1.GetOptions{}) + hpa, err = kc.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Get(context.Background(), name, metav1.GetOptions{}) t.Log("Waiting for hpa creation") if err == nil { return hpa, err