This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 85d3ad85079 Remove cross-test dependencies (#50462)
85d3ad85079 is described below

commit 85d3ad85079871bc3a4e698ff00484374b5b8467
Author: Przemysław Mirowski <[email protected]>
AuthorDate: Mon May 12 00:37:49 2025 +0200

    Remove cross-test dependencies (#50462)
---
 .../helm_tests/airflow_aux/test_pod_template_file.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py 
b/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
index 71bfa306eb5..d497f1df71c 100644
--- a/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
+++ b/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
@@ -24,8 +24,6 @@ import jmespath
 import pytest
 from chart_utils.helm_template_generator import render_chart
 
-from helm_tests.airflow_aux.test_container_lifecycle import 
CONTAINER_LIFECYCLE_PARAMETERS
-
 
 @pytest.fixture(scope="class")
 def isolate_chart(request, tmp_path_factory) -> Path:
@@ -923,21 +921,23 @@ class TestPodTemplateFile:
 
         assert jmespath.search("spec.priorityClassName", docs[0]) == 
"test-priority"
 
-    def test_workers_container_lifecycle_webhooks_are_configurable(self, 
hook_type="preStop"):
-        lifecycle_hook_params = CONTAINER_LIFECYCLE_PARAMETERS[hook_type]
-        lifecycle_hooks_config = {hook_type: 
lifecycle_hook_params["lifecycle_templated"]}
+    def test_workers_container_lifecycle_webhooks_are_configurable(self):
         docs = render_chart(
-            name=lifecycle_hook_params["release_name"],
+            name="test-release",
             values={
-                "workers": {"containerLifecycleHooks": lifecycle_hooks_config},
+                "workers": {
+                    "containerLifecycleHooks": {
+                        "preStop": {"exec": {"command": ["echo", "preStop", 
"{{ .Release.Name }}"]}}
+                    }
+                },
             },
             show_only=["templates/pod-template-file.yaml"],
             chart_dir=self.temp_chart_dir,
         )
 
-        assert lifecycle_hook_params["lifecycle_parsed"] == jmespath.search(
-            f"spec.containers[0].lifecycle.{hook_type}", docs[0]
-        )
+        assert jmespath.search("spec.containers[0].lifecycle.preStop", 
docs[0]) == {
+            "exec": {"command": ["echo", "preStop", "test-release"]}
+        }
 
     def test_termination_grace_period_seconds(self):
         docs = render_chart(

Reply via email to