jedcunningham commented on a change in pull request #18272:
URL: https://github.com/apache/airflow/pull/18272#discussion_r719805098
##########
File path: chart/tests/test_webserver.py
##########
@@ -236,6 +236,35 @@ def test_logs_persistence_adds_volume_and_mount(self,
log_persistence_values, ex
v["name"] for v in
jmespath.search("spec.template.spec.containers[0].volumeMounts", docs[0])
]
+ @parameterized.expand(
+ [
+ ("1.10.10", False),
+ ("1.10.12", True),
+ ("2.1.0", True),
+ ]
+ )
+ def test_config_volumes_and_mounts(self, af_version,
pod_template_file_expected):
+ # setup
+ docs = render_chart(
+ values={"airflowVersion": af_version},
+ show_only=["templates/webserver/webserver-deployment.yaml"],
+ )
+
+ # default config
+ assert {
+ "name": "config",
+ "mountPath": "/opt/airflow/airflow.cfg",
+ } in jmespath.search("spec.template.spec.containers[0].volumeMounts",
docs[0])
+
+ # pod_template_file config
+ assert pod_template_file_expected == (
+ {
+ "name": "config",
+ "mountPath": "/opt/airflow/pod_template_file.yaml",
+ }
+ in
jmespath.search("spec.template.spec.containers[0].volumeMounts", docs[0])
Review comment:
```suggestion
{
"name": "config",
"mountPath": "/opt/airflow/pod_template_file.yaml",
}
in
jmespath.search("spec.template.spec.containers[0].volumeMounts", docs[0])
```
--
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]