Fix update_auto_scaling_group. Closes #596.
This commit is contained in:
parent
d82d64b8bd
commit
c308ef4364
@ -221,8 +221,9 @@ class FakeAutoScalingGroup(object):
|
||||
self.max_size = max_size
|
||||
self.min_size = min_size
|
||||
|
||||
self.launch_config = self.autoscaling_backend.launch_configurations[launch_config_name]
|
||||
self.launch_config_name = launch_config_name
|
||||
if launch_config_name:
|
||||
self.launch_config = self.autoscaling_backend.launch_configurations[launch_config_name]
|
||||
self.launch_config_name = launch_config_name
|
||||
self.vpc_zone_identifier = vpc_zone_identifier
|
||||
self.health_check_period = health_check_period
|
||||
self.health_check_type = health_check_type
|
||||
|
@ -418,4 +418,24 @@ def test_describe_autoscaling_groups():
|
||||
AutoScalingGroupNames=["test_asg"]
|
||||
)
|
||||
response['ResponseMetadata']['HTTPStatusCode'].should.equal(200)
|
||||
response['AutoScalingGroups'][0]['AutoScalingGroupName'].should.equal('test_asg')
|
||||
response['AutoScalingGroups'][0]['AutoScalingGroupName'].should.equal('test_asg')
|
||||
|
||||
@mock_autoscaling
|
||||
def test_update_autoscaling_group_boto3():
|
||||
client = boto3.client('autoscaling', region_name='us-east-1')
|
||||
_ = client.create_launch_configuration(
|
||||
LaunchConfigurationName='test_launch_configuration'
|
||||
)
|
||||
_ = client.create_auto_scaling_group(
|
||||
AutoScalingGroupName='test_asg',
|
||||
LaunchConfigurationName='test_launch_configuration',
|
||||
MinSize=0,
|
||||
MaxSize=20,
|
||||
DesiredCapacity=5
|
||||
)
|
||||
|
||||
response = client.update_auto_scaling_group(
|
||||
AutoScalingGroupName='test_asg',
|
||||
MinSize=1,
|
||||
DesiredCapacity=1,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user