Added Exception to for describe_container_instances to match aws api
This commit is contained in:
parent
31198c75b8
commit
017cbb52ca
@ -790,6 +790,8 @@ class EC2ContainerServiceBackend(BaseBackend):
|
||||
cluster_name = cluster_str.split('/')[-1]
|
||||
if cluster_name not in self.clusters:
|
||||
raise Exception("{0} is not a cluster".format(cluster_name))
|
||||
if not list_container_instance_ids:
|
||||
raise JsonRESTError('InvalidParameterException', 'Container instance cannot be empty')
|
||||
failures = []
|
||||
container_instance_objects = []
|
||||
for container_instance_id in list_container_instance_ids:
|
||||
|
@ -889,6 +889,12 @@ def test_describe_container_instances():
|
||||
instance.keys().should.contain('runningTasksCount')
|
||||
instance.keys().should.contain('pendingTasksCount')
|
||||
|
||||
with assert_raises(ClientError) as e:
|
||||
ecs_client.describe_container_instances(
|
||||
cluster=test_cluster_name,
|
||||
containerInstances=[]
|
||||
)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
@mock_ecs
|
||||
|
Loading…
Reference in New Issue
Block a user