From bcdba6992065da92c6fa30089b5b447d07166b26 Mon Sep 17 00:00:00 2001 From: John Kyros Date: Mon, 29 Jul 2024 04:18:44 -0500 Subject: [PATCH] Add missing TestNamespace to ScaledJob validation test template (#5989) This scaledjob test template was missing its namespace, which doesn't generally matter for the test -- the test is just checking if the webhook works, it doesn't care where the scaledjob ends up. Where it does matter, is if you happen to run this test suite in a more restrictive environment where you can't write to the default namespace, because you fail with a namespace-related creation error instead of the expected "no triggers defined in the ScaledObject/ScaledJob" error. This just adds the namespace to the template so it's just like all the other ones in the test suite. Signed-off-by: John Kyros --- .../scaled_job_validation/scaled_job_validation_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/internals/scaled_job_validation/scaled_job_validation_test.go b/tests/internals/scaled_job_validation/scaled_job_validation_test.go index 62a2680e30f..217c3cc8c85 100644 --- a/tests/internals/scaled_job_validation/scaled_job_validation_test.go +++ b/tests/internals/scaled_job_validation/scaled_job_validation_test.go @@ -32,6 +32,7 @@ apiVersion: keda.sh/v1alpha1 kind: ScaledJob metadata: name: {{.EmptyTriggersSjName}} + namespace: {{.TestNamespace}} spec: jobTargetRef: template: