Add the status field to ECS task definitions (#3723)
Also I found extra tests for describe_task_definition and deregister_task_definition that were not being run, so I changed their names so they are found by pytest and made them pass. I also added checks to them for the new status field.
This commit is contained in:
parent
6a6c2ffd13
commit
0f4f01bb7b
2 changed files with 20 additions and 10 deletions
|
|
@ -177,6 +177,7 @@ class TaskDefinition(BaseObject, CloudFormationModel):
|
|||
|
||||
self.cpu = cpu
|
||||
self.memory = memory
|
||||
self.status = "ACTIVE"
|
||||
|
||||
@property
|
||||
def response_object(self):
|
||||
|
|
@ -788,7 +789,9 @@ class EC2ContainerServiceBackend(BaseBackend):
|
|||
family in self.task_definitions
|
||||
and revision in self.task_definitions[family]
|
||||
):
|
||||
return self.task_definitions[family].pop(revision)
|
||||
task_definition = self.task_definitions[family].pop(revision)
|
||||
task_definition.status = "INACTIVE"
|
||||
return task_definition
|
||||
else:
|
||||
raise TaskDefinitionNotFoundException
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue