victornoel commented on a change in pull request #4188: [AIRFLOW-3251] 
KubernetesPodOperator does not use 'image_pull_secrets…
URL: https://github.com/apache/incubator-airflow/pull/4188#discussion_r233741428
 
 

 ##########
 File path: tests/contrib/minikube/test_kubernetes_pod_operator.py
 ##########
 @@ -251,6 +251,22 @@ def test_faulty_service_account(self):
         with self.assertRaises(ApiException):
             k.execute(None)
 
+    def test_faulty_image_pull_secrets(self):
+        bad_image_pull_secrets = "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,
+            image_pull_secrets=bad_image_pull_secrets
+        )
+        with self.assertRaises(ApiException):
 
 Review comment:
   Thanks, anyway this doesn't work apparently, if it is not needed, the pull 
secret is not used it seems, I will think of another way to test this

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to