Exemplo n.º 1
0
 def run(self, cluster, service, desiredCount, taskDefinition, app=app):
     with app.app_context():
         update_service(cluster=cluster,
                        service=service,
                        desiredCount=desiredCount,
                        taskDefinition=taskDefinition,
         )
Exemplo n.º 2
0
 def run(self, cluster, service, desiredCount, taskDefinition, app=app):
     with app.app_context():
         update_service(
             cluster=cluster,
             service=service,
             desiredCount=desiredCount,
             taskDefinition=taskDefinition,
         )
 def test_update_service(self, Session):
     """
     the update_service task should pass call the boto3 task after
     establishing a session
     """
     session = Session.return_value
     client = session.client.return_value
     kwargs = dict(
         cluster="unittest-cluster", service="unittest-service", desiredCount=5, taskDefinition='{"valid": "json"}'
     )
     update_service(**kwargs)
     session.client.assert_called_with("ecs")
     client.update_service.assert_called_with(**kwargs)
Exemplo n.º 4
0
 def test_update_service(self, Session):
     """
     the update_service task should pass call the boto3 task after
     establishing a session
     """
     session = Session.return_value
     client = session.client.return_value
     kwargs = dict(
         cluster="unittest-cluster",
         service="unittest-service",
         desiredCount=5,
         taskDefinition='{"valid": "json"}',
     )
     update_service(**kwargs)
     session.client.assert_called_with('ecs')
     client.update_service.assert_called_with(**kwargs)