From aed658d5a639229b419d00b55d526630242424d0 Mon Sep 17 00:00:00 2001 From: Shane Date: Sun, 8 Dec 2024 00:23:53 +0800 Subject: [PATCH] Update scaledobject_webhook_test.go Signed-off-by: Shane --- apis/keda/v1alpha1/scaledobject_webhook_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/keda/v1alpha1/scaledobject_webhook_test.go b/apis/keda/v1alpha1/scaledobject_webhook_test.go index dbfef493cc7..4df23b7c271 100644 --- a/apis/keda/v1alpha1/scaledobject_webhook_test.go +++ b/apis/keda/v1alpha1/scaledobject_webhook_test.go @@ -185,9 +185,9 @@ var _ = It("should validate the so creation When the fallback are configured and FailureThreshold: 3, Replicas: 6, } - for _, trigger := range so.Spec.Triggers { - trigger.MetricType = "AverageValue" - } + for i, _ := range so.Spec.Triggers { + so.Spec.Triggers[i].MetricType = "AverageValue" + } err := k8sClient.Create(context.Background(), namespace) Expect(err).ToNot(HaveOccurred())