You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/29 08:15:06 UTC

[GitHub] [airflow] Aakcht commented on a diff in pull request #27779: Chart: add airflow_local_settings to all airflow containers

Aakcht commented on code in PR #27779:
URL: https://github.com/apache/airflow/pull/27779#discussion_r1034422405


##########
tests/charts/test_cleanup_pods.py:
##########
@@ -239,6 +239,42 @@ def test_should_set_job_history_limits(self):
         assert 2 == jmespath.search("spec.failedJobsHistoryLimit", docs[0])
         assert 4 == jmespath.search("spec.successfulJobsHistoryLimit", docs[0])
 
+    def test_no_airflow_local_settings(self):
+        docs = render_chart(
+            values={
+                "cleanup": {
+                    "enabled": True,
+                    "failedJobsHistoryLimit": 2,
+                    "successfulJobsHistoryLimit": 4,
+                },
+                "airflowLocalSettings": None,
+            },
+            show_only=["templates/cleanup/cleanup-cronjob.yaml"],
+        )
+        volume_mounts = jmespath.search(
+            "spec.jobTemplate.spec.template.spec.containers[0].volumeMounts", docs[0]
+        )
+        assert "airflow_local_settings.py" not in str(volume_mounts)
+
+    def test_airflow_local_settings(self):
+        docs = render_chart(
+            values={
+                "cleanup": {
+                    "enabled": True,
+                    "failedJobsHistoryLimit": 2,
+                    "successfulJobsHistoryLimit": 4,
+                },

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org