kakatur commented on code in PR #64745:
URL: https://github.com/apache/airflow/pull/64745#discussion_r3300694871
##########
providers/amazon/tests/unit/amazon/aws/operators/test_batch.py:
##########
@@ -149,16 +149,24 @@ def test_init_defaults(self):
def test_template_fields_overrides(self):
validate_template_fields(self.batch)
+ @mock.patch.object(BatchClientHook, "get_job_all_awslogs_info")
@mock.patch.object(BatchClientHook, "get_job_description")
@mock.patch.object(BatchClientHook, "wait_for_job")
@mock.patch.object(BatchClientHook, "check_job_success")
- def test_execute_without_failures(self, check_mock, wait_mock,
job_description_mock):
+ def test_execute_without_failures(
+ self, check_mock, wait_mock, job_description_mock,
get_job_all_awslogs_info_mock
+ ):
# JOB_ID is in RESPONSE_WITHOUT_FAILURES
self.client_mock.submit_job.return_value = RESPONSE_WITHOUT_FAILURES
self.batch.job_id = None
self.batch.waiters = None # use default wait
+ get_job_all_awslogs_info_mock.return_value = []
+ # Enable xcom push so _persist_cloudwatch_link actually runs
+ self.batch.do_xcom_push = True
+ # Use a real dict so "ti" in context works correctly
Review Comment:
Remove do_xcom_push guard from CloudWatch link persistence to match other
links
--
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]