diff --git a/apis/keda/v1alpha1/scaledobject_webhook_test.go b/apis/keda/v1alpha1/scaledobject_webhook_test.go index 08970b121ac..dbfef493cc7 100644 --- a/apis/keda/v1alpha1/scaledobject_webhook_test.go +++ b/apis/keda/v1alpha1/scaledobject_webhook_test.go @@ -177,7 +177,7 @@ var _ = It("shouldn't validate the so creation when the fallback is wrong", func }) var _ = It("should validate the so creation When the fallback are configured and the scaler is either CPU or memory.", func() { - namespaceName := "wrong-fallback-cpu-memory" + namespaceName := "right-fallback-cpu-memory" namespace := createNamespace(namespaceName) workload := createDeployment(namespaceName, true, true) so := createScaledObject(soName, namespaceName, workloadName, "apps/v1", "Deployment", true, map[string]string{}, "") @@ -185,6 +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" + } err := k8sClient.Create(context.Background(), namespace) Expect(err).ToNot(HaveOccurred())