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

husseinawala 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 09a8fd4d31 Improve helm chart wait_for_migration tests (#31667)
09a8fd4d31 is described below

commit 09a8fd4d31a0bd27d43c4774d5701a5f559adccc
Author: Hussein Awala <[email protected]>
AuthorDate: Fri Jun 2 18:04:25 2023 +0300

    Improve helm chart wait_for_migration tests (#31667)
---
 tests/charts/airflow_core/test_dag_processor.py | 4 +++-
 tests/charts/airflow_core/test_scheduler.py     | 4 +++-
 tests/charts/airflow_core/test_triggerer.py     | 4 +++-
 tests/charts/webserver/test_webserver.py        | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/charts/airflow_core/test_dag_processor.py 
b/tests/charts/airflow_core/test_dag_processor.py
index 97c2544a81..bbc811e447 100644
--- a/tests/charts/airflow_core/test_dag_processor.py
+++ b/tests/charts/airflow_core/test_dag_processor.py
@@ -64,7 +64,9 @@ class TestDagProcessor:
             },
             
show_only=["templates/dag-processor/dag-processor-deployment.yaml"],
         )
-        actual = jmespath.search("spec.template.spec.initContainers", docs[0])
+        actual = jmespath.search(
+            
"spec.template.spec.initContainers[?name=='wait-for-airflow-migrations']", 
docs[0]
+        )
         assert actual is None
 
     def test_should_add_extra_containers(self):
diff --git a/tests/charts/airflow_core/test_scheduler.py 
b/tests/charts/airflow_core/test_scheduler.py
index dbf8161f60..42ce8549d6 100644
--- a/tests/charts/airflow_core/test_scheduler.py
+++ b/tests/charts/airflow_core/test_scheduler.py
@@ -79,7 +79,9 @@ class TestScheduler:
             },
             show_only=["templates/scheduler/scheduler-deployment.yaml"],
         )
-        actual = jmespath.search("spec.template.spec.initContainers", docs[0])
+        actual = jmespath.search(
+            
"spec.template.spec.initContainers[?name=='wait-for-airflow-migrations']", 
docs[0]
+        )
         assert actual is None
 
     def test_should_add_extra_init_containers(self):
diff --git a/tests/charts/airflow_core/test_triggerer.py 
b/tests/charts/airflow_core/test_triggerer.py
index e5a227a170..b4589877e0 100644
--- a/tests/charts/airflow_core/test_triggerer.py
+++ b/tests/charts/airflow_core/test_triggerer.py
@@ -82,7 +82,9 @@ class TestTriggerer:
             },
             show_only=["templates/triggerer/triggerer-deployment.yaml"],
         )
-        actual = jmespath.search("spec.template.spec.initContainers", docs[0])
+        actual = jmespath.search(
+            
"spec.template.spec.initContainers[?name=='wait-for-airflow-migrations']", 
docs[0]
+        )
         assert actual is None
 
     def test_should_add_extra_containers(self):
diff --git a/tests/charts/webserver/test_webserver.py 
b/tests/charts/webserver/test_webserver.py
index 06b0de62d2..d0488b1a8a 100644
--- a/tests/charts/webserver/test_webserver.py
+++ b/tests/charts/webserver/test_webserver.py
@@ -254,7 +254,9 @@ class TestWebserverDeployment:
             },
             show_only=["templates/webserver/webserver-deployment.yaml"],
         )
-        actual = jmespath.search("spec.template.spec.initContainers", docs[0])
+        actual = jmespath.search(
+            
"spec.template.spec.initContainers[?name=='wait-for-airflow-migrations']", 
docs[0]
+        )
         assert actual is None
 
     def test_should_add_extra_init_containers(self):

Reply via email to