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/03/25 21:37:24 UTC

[GitHub] [airflow] jedcunningham commented on a change in pull request #22323: enable optional subPath for dags volume mount

jedcunningham commented on a change in pull request #22323:
URL: https://github.com/apache/airflow/pull/22323#discussion_r835622010



##########
File path: tests/charts/test_scheduler.py
##########
@@ -518,3 +518,11 @@ def test_log_groomer_resources(self):
                 "memory": "2Gi",
             },
         } == jmespath.search("spec.template.spec.containers[1].resources", docs[0])
+
+    def test_dags_persistence_subpath(self):
+        docs = render_chart(
+            values={"dags": {"persistence": {"enabled": True, "subPath": "test/dags"}}},
+            show_only=["templates/scheduler/scheduler-deployment.yaml"],
+        )
+
+        assert "dags" in jmespath.search("spec.template.spec.containers[0].volumeMounts[*].name", docs[0])

Review comment:
       This isn't a "good" assertion, as it would pass without any of your subpath template changes, or even without subPath in the values in this test. Try something like this instead:
   
   ```suggestion
           assert "test/dags" in jmespath.search("spec.template.spec.containers[0].volumeMounts[?name == 'dags'].subPath", 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: commits-unsubscribe@airflow.apache.org

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