You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/04 16:55:51 UTC

[GitHub] [airflow] baxievski commented on a change in pull request #12096: add xcom push for ECSOperator

baxievski commented on a change in pull request #12096:
URL: https://github.com/apache/airflow/pull/12096#discussion_r551440334



##########
File path: tests/providers/amazon/aws/operators/test_ecs.py
##########
@@ -314,3 +314,22 @@ def test_reattach_successful(self, launch_type, tags, start_mock, check_mock, wa
         self.assertEqual(
             self.ecs.arn, 'arn:aws:ecs:us-east-1:012345678910:task/d8c67b3c-ac87-4ffe-a847-4785bc3a8b55'
         )
+
+    @mock.patch.object(
+        ECSOperator, '_cloudwatch_log_events', return_value=[{"message": "Log output", "timestamp": 1000}]
+    )
+    def test_execute_xcom_with_log(self, _):
+        self.ecs.do_xcom_push = True
+        self.assertEqual(self.ecs.execute(None), "Log output")

Review comment:
       > LGTM, just a minor "improvement". WDYT? :)
   
   Yeah, definitely an improvement - thanks!
   
   I avoided the `log_message` assignment since it's only used once.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org