Use known AMI in internal tests (#3620)
Moto's implementation of autoscaling:CreateLaunchConfiguration is a little too loose, allowing the ImageId parameter to be omitted and defaulting it to None, which results in dozens of deprecation warnings: `PendingDeprecationWarning: Could not find AMI with image-id:ami-123456, in the near future this will cause an error.` This commit refactors calls to CreateLaunchConfiguration to explicitly pass in a known AMI ImageId in order to avoid these warnings. The integrity of the tests is unaffected by this change.
This commit is contained in:
parent
b9b793f421
commit
9e1fcac9d4
6 changed files with 162 additions and 47 deletions
|
|
@ -81,7 +81,9 @@ def test_autoscaling_group_from_launch_config():
|
|||
client = boto3.client("autoscaling", region_name="us-east-1")
|
||||
|
||||
client.create_launch_configuration(
|
||||
LaunchConfigurationName="test_launch_configuration", InstanceType="t2.micro",
|
||||
LaunchConfigurationName="test_launch_configuration",
|
||||
InstanceType="t2.micro",
|
||||
ImageId=EXAMPLE_AMI_ID,
|
||||
)
|
||||
stack_name = "test-auto-scaling-group"
|
||||
|
||||
|
|
@ -123,6 +125,7 @@ Outputs:
|
|||
client.create_launch_configuration(
|
||||
LaunchConfigurationName="test_launch_configuration_new",
|
||||
InstanceType="t2.micro",
|
||||
ImageId=EXAMPLE_AMI_ID,
|
||||
)
|
||||
|
||||
cf_template = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue