Skip to content

Commit

Permalink
Merge pull request #902 from mvantellingen/ecs-revision
Browse files Browse the repository at this point in the history
Return the revision in ecs.register_task_definition
  • Loading branch information
spulec committed Apr 16, 2017
2 parents de28e7f + 18ed732 commit cc123da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions moto/ecs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class TaskDefinition(BaseObject):

def __init__(self, family, revision, container_definitions, volumes=None):
self.family = family
self.revision = revision
self.arn = 'arn:aws:ecs:us-east-1:012345678910:task-definition/{0}:{1}'.format(
family, revision)
self.container_definitions = container_definitions
Expand Down
1 change: 1 addition & 0 deletions tests/test_ecs/test_ecs_boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_register_task_definition():
]
)
type(response['taskDefinition']).should.be(dict)
response['taskDefinition']['revision'].should.equal(1)
response['taskDefinition']['taskDefinitionArn'].should.equal(
'arn:aws:ecs:us-east-1:012345678910:task-definition/test_ecs_task:1')
response['taskDefinition']['containerDefinitions'][
Expand Down

0 comments on commit cc123da

Please sign in to comment.