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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]