jykae commented on code in PR #67333:
URL: https://github.com/apache/airflow/pull/67333#discussion_r3308940152
##########
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_job.py:
##########
@@ -105,6 +106,25 @@ def create_context(task, persist_to_db=False,
map_index=None):
}
+def _recording_pod_manager():
+ """A ``pod_manager`` mock that records ``delete_pod`` invocations by pod
name.
+
+ Tests should assert against ``pm.deleted`` to observe which monitoring pods
+ were actually deleted — the only thing that matters to the cluster.
+ """
+ pm = mock.MagicMock()
+ pm.deleted = []
+ pm.delete_pod.side_effect = lambda pod:
pm.deleted.append(pod.metadata.name)
Review Comment:
fixed
https://github.com/apache/airflow/pull/67333/commits/d42fd91c5b16ac1d40d530b893576e5b7a11b40a
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]