airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Fokko commented on a change in pull request #3697: [AIRFLOW-2854] kubernetes_pod_operator add more configuration items
Date Fri, 24 Aug 2018 09:40:48 GMT
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_r212574450
 
 

 ##########
 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:
+            k.execute(None),
+
+        print("exception: {}".format(cm))
 
 Review comment:
   Can you remove the print?

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

Mime
View raw message