amoghrajesh commented on code in PR #44173:
URL: https://github.com/apache/airflow/pull/44173#discussion_r1886242145


##########
helm_tests/airflow_core/test_scheduler.py:
##########
@@ -959,27 +959,54 @@ def test_should_add_component_specific_labels(self):
         assert "test_label" in jmespath.search("metadata.labels", docs[0])
         assert jmespath.search("metadata.labels", docs[0])["test_label"] == 
"test_label_value"
 
-    def test_default_automount_service_account_token(self):
+    @pytest.mark.parametrize(
+        "executor, default_automount_service_account",
+        [
+            ("LocalExecutor", None),
+            ("CeleryExecutor", True),
+            ("CeleryKubernetesExecutor", None),
+            ("KubernetesExecutor", None),
+            ("LocalKubernetesExecutor", None),
+        ],
+    )
+    def test_default_automount_service_account_token(self, executor, 
default_automount_service_account):
         docs = render_chart(
             values={
                 "scheduler": {
                     "serviceAccount": {"create": True},
                 },
+                "executor": executor,
             },
             show_only=["templates/scheduler/scheduler-serviceaccount.yaml"],
         )
-        assert jmespath.search("automountServiceAccountToken", docs[0]) is True
+        assert jmespath.search("automountServiceAccountToken", docs[0]) is 
default_automount_service_account
 
-    def test_overridden_automount_service_account_token(self):
+    @pytest.mark.parametrize(
+        "executor, automount_service_account, shoud_automount_service_account",

Review Comment:
   ```suggestion
           "executor, automount_service_account, 
should_automount_service_account",
   ```
   
   nit



##########
chart/templates/scheduler/scheduler-serviceaccount.yaml:
##########
@@ -23,7 +23,9 @@
 {{- if and .Values.scheduler.enabled .Values.scheduler.serviceAccount.create }}
 apiVersion: v1
 kind: ServiceAccount
+{{- if eq .Values.executor "CeleryExecutor" }}

Review Comment:
   Right, for celery executor, we should allow the overriding



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