Skip to content

Commit

Permalink
Chart: less fragile webserver deployment tests (apache#18332)
Browse files Browse the repository at this point in the history
Simply make the log persistence tests be less fragile by not caring
about volume and volume mount order.
  • Loading branch information
jedcunningham authored Sep 17, 2021
1 parent 516d6d8 commit d7a8a8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chart/tests/test_webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ def test_logs_persistence_adds_volume_and_mount(self, log_persistence_values, ex
assert {
"name": "logs",
"persistentVolumeClaim": {"claimName": expected_claim_name},
} == jmespath.search("spec.template.spec.volumes[1]", docs[0])
} in jmespath.search("spec.template.spec.volumes", docs[0])
assert {
"name": "logs",
"mountPath": "/opt/airflow/logs",
} == jmespath.search("spec.template.spec.containers[0].volumeMounts[1]", docs[0])
} in jmespath.search("spec.template.spec.containers[0].volumeMounts", docs[0])
else:
assert "logs" not in [v["name"] for v in jmespath.search("spec.template.spec.volumes", docs[0])]
assert "logs" not in [
Expand Down

0 comments on commit d7a8a8f

Please sign in to comment.