Fix runningTasksCount ECS container instance attribute

ECS container instances have attributes of 'runningTasksCount' and 'pendingTasksCount'.
See Boto3 docs here: http://boto3.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_container_instances
REST API docs here: http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeContainerInstances.html#API_DescribeContainerInstances_ResponseSyntax
This commit is contained in:
Tom Elliff 2017-10-12 13:26:19 +01:00
commit 51afd54229
2 changed files with 7 additions and 5 deletions

View file

@ -1210,6 +1210,7 @@ def test_resource_reservation_and_release():
remaining_resources['MEMORY'].should.equal(registered_resources['MEMORY'] - 400)
registered_resources['PORTS'].append('80')
remaining_resources['PORTS'].should.equal(registered_resources['PORTS'])
container_instance_description['runningTasksCount'].should.equal(1)
client.stop_task(
cluster='test_ecs_cluster',
task=run_response['tasks'][0].get('taskArn'),
@ -1223,6 +1224,7 @@ def test_resource_reservation_and_release():
remaining_resources['CPU'].should.equal(registered_resources['CPU'])
remaining_resources['MEMORY'].should.equal(registered_resources['MEMORY'])
remaining_resources['PORTS'].should.equal(registered_resources['PORTS'])
container_instance_description['runningTasksCount'].should.equal(0)
@mock_ecs