From ada20cea6169035ff2f3307d7591829dff840431 Mon Sep 17 00:00:00 2001 From: Marco Rucci Date: Sun, 13 Jul 2014 20:47:35 +0200 Subject: [PATCH] Fix retrieval of autoscaling group instances. --- moto/autoscaling/responses.py | 12 +++++++++++- tests/test_autoscaling/test_autoscaling.py | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py index 267db1f91..890317ee5 100644 --- a/moto/autoscaling/responses.py +++ b/moto/autoscaling/responses.py @@ -258,7 +258,17 @@ DESCRIBE_AUTOSCALING_GROUPS_TEMPLATE = """2013-05-06T17:47:15.107Z {{ group.launch_config_name }} - + + {% for instance in group.instances %} + + HEALTHY + us-east-1e + {{ instance.id }} + {{ instance.autoscaling_group.launch_config_name }} + InService + + {% endfor %} + {{ group.desired_capacity }} {% for availability_zone in group.availability_zones %} diff --git a/tests/test_autoscaling/test_autoscaling.py b/tests/test_autoscaling/test_autoscaling.py index 676833a96..1559569f5 100644 --- a/tests/test_autoscaling/test_autoscaling.py +++ b/tests/test_autoscaling/test_autoscaling.py @@ -40,6 +40,7 @@ def test_create_autoscaling_group(): group.desired_capacity.should.equal(2) group.max_size.should.equal(2) group.min_size.should.equal(2) + group.instances.should.have.length_of(2) group.vpc_zone_identifier.should.equal('subnet-1234abcd') group.launch_config_name.should.equal('tester') group.default_cooldown.should.equal(60)