Fix JSON dump error in ecs.update_service with task_definition (#775)

This commit is contained in:
Pior Bastida 2016-11-23 20:01:48 -05:00 committed by Steve Pulec
parent 4ea915fc3a
commit 09ca1c4388
2 changed files with 3 additions and 2 deletions

View File

@ -375,8 +375,8 @@ class EC2ContainerServiceBackend(BaseBackend):
cluster_service_pair = '{0}:{1}'.format(cluster_name, service_name)
if cluster_service_pair in self.services:
if task_definition_str is not None:
task_definition = self.fetch_task_definition(task_definition_str)
self.services[cluster_service_pair].task_definition = task_definition
self.fetch_task_definition(task_definition_str)
self.services[cluster_service_pair].task_definition = task_definition_str
if desired_count is not None:
self.services[cluster_service_pair].desired_count = desired_count
return self.services[cluster_service_pair]

View File

@ -398,6 +398,7 @@ def test_update_service():
response = client.update_service(
cluster='test_ecs_cluster',
service='test_ecs_service',
taskDefinition='test_ecs_task',
desiredCount=0
)
response['service']['desiredCount'].should.equal(0)