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 2018/08/24 09:40:48 UTC

[GitHub] Fokko commented on a change in pull request #3697: [AIRFLOW-2854] kubernetes_pod_operator add more configuration items

Fokko commented on a change in pull request #3697: [AIRFLOW-2854] kubernetes_pod_operator add more configuration items
URL: https://github.com/apache/incubator-airflow/pull/3697#discussion_r212574502
 
 

 ##########
 File path: tests/contrib/minikube/test_kubernetes_pod_operator.py
 ##########
 @@ -199,6 +213,24 @@ def test_faulty_image(self):
 
         print("exception: {}".format(cm))
 
+    def test_faulty_service_account(self):
+        bad_service_account_name = "foobar"
+        k = KubernetesPodOperator(
+            namespace='default',
+            image="ubuntu:16.04",
+            cmds=["bash", "-cx"],
+            arguments=["echo 10"],
+            labels={"foo": "bar"},
+            name="test",
+            task_id="task",
+            startup_timeout_seconds=5,
+            service_account_name=bad_service_account_name
+        )
+        with self.assertRaises(ApiException) as cm:
 
 Review comment:
   Please remove the `as cm` since it is not used.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services