This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 07178a7f62 add pod status phase to KPO test mock (#30782)
07178a7f62 is described below
commit 07178a7f624f2701e60b0e652d785cbff45c4e5d
Author: Hussein Awala <[email protected]>
AuthorDate: Fri Apr 21 01:26:12 2023 +0200
add pod status phase to KPO test mock (#30782)
---
tests/providers/cncf/kubernetes/operators/test_pod.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/providers/cncf/kubernetes/operators/test_pod.py
b/tests/providers/cncf/kubernetes/operators/test_pod.py
index b9d21b5151..0e1bcfdbe0 100644
--- a/tests/providers/cncf/kubernetes/operators/test_pod.py
+++ b/tests/providers/cncf/kubernetes/operators/test_pod.py
@@ -1096,7 +1096,7 @@ class TestKubernetesPodOperator:
({"skip_on_exit_code": (100, 101)}, 100, AirflowSkipException),
({"skip_on_exit_code": 100}, 101, AirflowException),
({"skip_on_exit_code": [100, 102]}, 101, AirflowException),
- ({"skip_on_exit_code": None}, 0, AirflowException),
+ ({"skip_on_exit_code": None}, 0, None),
],
)
@patch(f"{POD_MANAGER_CLASS}.await_pod_completion")
@@ -1115,6 +1115,7 @@ class TestKubernetesPodOperator:
sidecar_container.name = "airflow-xcom-sidecar"
sidecar_container.last_state.terminated.exit_code = 0
remote_pod.return_value.status.container_statuses = [base_container,
sidecar_container]
+ remote_pod.return_value.status.phase = "Succeeded" if actual_exit_code
== 0 else "Failed"
if expected_exc is None:
self.run_pod(k)