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


##########
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:
   These other 3 tests can use 
[parametrization](https://docs.pytest.org/en/7.0.x/how-to/parametrize.html). 
Can you refactor them?



##########
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={},

Review Comment:
   ```suggestion
   ```



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