XD-DENG commented on a change in pull request #4160: [AIRFLOW-3311] Allow pod
operator to keep failed pods
URL: https://github.com/apache/incubator-airflow/pull/4160#discussion_r238688263
##########
File path: tests/contrib/minikube/test_kubernetes_pod_operator.py
##########
@@ -111,6 +111,21 @@ def test_delete_operator_pod():
)
k.execute(None)
+ def test_keep_failed_pod(self):
+ k = KubernetesPodOperator(
+ namespace='default',
+ image="ubuntu:16.04",
+ cmds=["bash", "-cx"],
+ arguments=["exit 1"],
+ labels={"foo": "bar"},
+ name="test",
+ task_id="task",
+ is_delete_operator_pod=True,
+ keep_failed_pod=True
+ )
+ with self.assertRaises(AirflowException):
+ k.execute(None)
Review comment:
Seems this test can't really test what happens when `keep_failed_pod=True`?
It's only testing `arguments`.
----------------------------------------------------------------
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