nyirit commented on code in PR #39132:
URL: https://github.com/apache/airflow/pull/39132#discussion_r1575247591


##########
helm_tests/airflow_aux/test_pod_template_file.py:
##########
@@ -900,3 +900,41 @@ def test_airflow_kerberos_init_container(
         if expected_init_containers == 1:
             assert initContainers[0]["name"] == "kerberos-init"
             assert initContainers[0]["args"] == ["kerberos", "-o"]
+
+    def test_should_add_command(self):
+        docs = render_chart(
+            values={
+                "workers": {"command": ["test", "command", "to", "run"]},
+            },
+            show_only=["templates/pod-template-file.yaml"],
+            chart_dir=self.temp_chart_dir,
+        )
+
+        assert ["test", "command", "to", "run"] == 
jmespath.search("spec.containers[0].command", docs[0])
+
+    def test_should_not_add_command_by_default(self):
+        docs = render_chart(
+            values={},
+            show_only=["templates/pod-template-file.yaml"],
+            chart_dir=self.temp_chart_dir,
+        )
+
+        assert None is jmespath.search("spec.containers[0].command", docs[0])
+
+    def test_should_not_add_command_if_value_none(self):

Review Comment:
   Makes sense. I've refactored it and also realised a templated command test 
case could also be added. I'm not sure if I should use parametrization for the 
templated version as well or if it's cleaner without it, but went ahead with 
that for now. Let me know what you think.



-- 
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]

Reply via email to