Fix default HealthCheckGracePeriod
This commit is contained in:
parent
5d421dc343
commit
5aca483849
3 changed files with 73 additions and 0 deletions
41
tests/test_autoscaling/test_autoscaling_boto3.py
Normal file
41
tests/test_autoscaling/test_autoscaling_boto3.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
from __future__ import unicode_literals
|
||||
import boto3
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_autoscaling
|
||||
|
||||
|
||||
@mock_autoscaling
|
||||
def test_create_autoscaling_group():
|
||||
client = boto3.client('autoscaling')
|
||||
_ = client.create_launch_configuration(
|
||||
LaunchConfigurationName='test_launch_configuration'
|
||||
)
|
||||
response = client.create_auto_scaling_group(
|
||||
AutoScalingGroupName='test_asg',
|
||||
LaunchConfigurationName='test_launch_configuration',
|
||||
MinSize=0,
|
||||
MaxSize=20,
|
||||
DesiredCapacity=5
|
||||
)
|
||||
response['ResponseMetadata']['HTTPStatusCode'].should.equal(200)
|
||||
|
||||
|
||||
@mock_autoscaling
|
||||
def test_describe_autoscaling_groups():
|
||||
client = boto3.client('autoscaling')
|
||||
_ = 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.describe_auto_scaling_groups(
|
||||
AutoScalingGroupNames=["test_asg"]
|
||||
)
|
||||
response['ResponseMetadata']['HTTPStatusCode'].should.equal(200)
|
||||
response['AutoScalingGroups'][0]['AutoScalingGroupName'].should.equal('test_asg')
|
||||
23
tests/test_autoscaling/test_launch_configurations_boto3.py
Normal file
23
tests/test_autoscaling/test_launch_configurations_boto3.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from __future__ import unicode_literals
|
||||
import boto3
|
||||
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_autoscaling
|
||||
|
||||
|
||||
@mock_autoscaling
|
||||
def test_create_launch_configuration():
|
||||
client = boto3.client('autoscaling')
|
||||
response = client.create_launch_configuration(
|
||||
LaunchConfigurationName='tester',
|
||||
ImageId='ami-abcd1234',
|
||||
InstanceType='t1.micro',
|
||||
KeyName='the_keys',
|
||||
SecurityGroups=["default", "default2"],
|
||||
UserData="This is some user_data",
|
||||
InstanceMonitoring={'Enabled': True},
|
||||
IamInstanceProfile='arn:aws:iam::123456789012:instance-profile/testing',
|
||||
SpotPrice='0.1'
|
||||
)
|
||||
response['ResponseMetadata']['HTTPStatusCode'].should.equal(200)
|
||||
Loading…
Add table
Add a link
Reference in a new issue