diff --git a/helm_tests/other/test_keda.py b/helm_tests/other/test_keda.py index 09fa4985f2864..6fb0d4b884b7f 100644 --- a/helm_tests/other/test_keda.py +++ b/helm_tests/other/test_keda.py @@ -54,6 +54,23 @@ def test_keda_enabled(self, executor, is_created): else: assert docs == [] + @pytest.mark.parametrize( + "executor, is_created", + [ + ("CeleryExecutor", True), + ("CeleryKubernetesExecutor", True), + ], + ) + def test_include_event_source_container_name_in_scaled_object(self, executor, is_created): + docs = render_chart( + values={ + "workers": {"keda": {"enabled": True}, "persistence": {"enabled": False}}, + "executor": executor, + }, + show_only=["templates/workers/worker-kedaautoscaler.yaml"], + ) + assert jmespath.search("spec.scaleTargetRef.envSourceContainerName", docs[0]) == "release-name-worker" + @pytest.mark.parametrize("executor", ["CeleryExecutor", "CeleryKubernetesExecutor"]) def test_keda_advanced(self, executor): """Verify keda advanced config."""