Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankeidel authored and eladkal committed Feb 6, 2025
1 parent 29e6c49 commit 92458a8
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions tests/charts/log_groomer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,13 @@ def test_log_groomer_retention_days_overrides(self, retention_days, retention_re
)

if retention_result:
assert jmespath.search(
"spec.template.spec.containers[1].env[?name=='AIRFLOW__LOG_RETENTION_DAYS'].value | [0]", docs[0]
) == retention_result
assert (
jmespath.search(
"spec.template.spec.containers[1].env[?name=='AIRFLOW__LOG_RETENTION_DAYS'].value | [0]",
docs[0],
)
== retention_result
)
else:
assert len(jmespath.search("spec.template.spec.containers[1].env", docs[0])) == 2

Expand All @@ -205,9 +209,13 @@ def test_log_groomer_frequency_minutes_overrides(self, frequency_minutes, freque
)

if frequency_result:
assert jmespath.search(
"spec.template.spec.containers[1].env[?name=='AIRFLOW__LOG_CLEANUP_FREQUENCY_MINUTES'].value | [0]", docs[0]
) == frequency_result
assert (
jmespath.search(
"spec.template.spec.containers[1].env[?name=='AIRFLOW__LOG_CLEANUP_FREQUENCY_MINUTES'].value | [0]",
docs[0],
)
== frequency_result
)
else:
assert len(jmespath.search("spec.template.spec.containers[1].env", docs[0])) == 2

Expand Down Expand Up @@ -262,6 +270,7 @@ def test_log_groomer_has_airflow_home(self):
values=values, show_only=[f"templates/{self.folder}/{self.obj_name}-deployment.yaml"]
)

assert jmespath.search(
"spec.template.spec.containers[1].env[?name=='AIRFLOW_HOME'].name | [0]", docs[0]
) == "AIRFLOW_HOME"
assert (
jmespath.search("spec.template.spec.containers[1].env[?name=='AIRFLOW_HOME'].name | [0]", docs[0])
== "AIRFLOW_HOME"
)

0 comments on commit 92458a8

Please sign in to comment.