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 2018/12/27 01:02:10 UTC

[GitHub] jmcarp commented on a change in pull request #4256: [AIRFLOW-3417] Use the platformVersion only for the FARGATE launch type

jmcarp commented on a change in pull request #4256: [AIRFLOW-3417] Use the platformVersion only for the FARGATE launch type
URL: https://github.com/apache/incubator-airflow/pull/4256#discussion_r244066387
 
 

 ##########
 File path: tests/contrib/operators/test_ecs_operator.py
 ##########
 @@ -63,26 +65,26 @@ def setUp(self, aws_hook_mock):
         configuration.load_test_config()
 
         self.aws_hook_mock = aws_hook_mock
-        self.ecs = ECSOperator(
-            task_id='task',
-            task_definition='t',
-            cluster='c',
-            overrides={},
-            aws_conn_id=None,
-            region_name='eu-west-1',
-            group='group',
-            placement_constraints=[
-                {
-                    'expression': 'attribute:ecs.instance-type =~ t2.*',
-                    'type': 'memberOf'
-                }
-            ],
-            network_configuration={
+        self.ecs_operator_args = {
+            'task_id': 'task',
+            'task_definition': 't',
+            'cluster': 'c',
+            'overrides': {},
+            'aws_conn_id': None,
+            'region_name': 'eu-west-1',
+            'group': 'group',
+            'placement_constraints': [{
+                'expression': 'attribute:ecs.instance-type =~ t2.*',
+                'type': 'memberOf'
+            }],
+            'network_configuration': {
                 'awsvpcConfiguration': {
                     'securityGroups': ['sg-123abc']
                 }
             }
-        )
+        }
+        self.ecs = ECSOperator(**self.ecs_operator_args)
+        self.ecs_fargate = ECSOperator(launch_type='FARGATE', **self.ecs_operator_args)
 
 Review comment:
   Do we need to instantiate a new fargate operator before each test if only one test uses it? What do you think about setting `self.launch_type` in the relevant tests instead?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services