-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
CFn: fix number parameter types #13231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eb00bf9
2979ec5
36e626c
ceb8ec2
7938398
812284b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,11 @@ | ||
| import os.path | ||
|
|
||
| import pytest | ||
| from tests.aws.services.cloudformation.conftest import skip_if_legacy_engine | ||
|
|
||
| from localstack.testing.pytest import markers | ||
| from localstack.testing.pytest.fixtures import StackDeployError | ||
| from localstack.utils.strings import short_uid | ||
|
|
||
|
|
||
| @markers.aws.validated | ||
|
|
@@ -47,3 +52,26 @@ def test_cfn_handle_log_group_resource(deploy_cfn_template, aws_client, snapshot | |
| stack.destroy() | ||
| response = aws_client.logs.describe_log_groups(logGroupNamePrefix=log_group_prefix) | ||
| assert len(response["logGroups"]) == 0 | ||
|
|
||
|
|
||
| @markers.aws.validated | ||
| @skip_if_legacy_engine() | ||
| def test_handle_existing_log_group(deploy_cfn_template, aws_client, snapshot, cleanups): | ||
| snapshot.add_transformer(snapshot.transform.cloudformation_api()) | ||
| snapshot.add_transformer(snapshot.transform.key_value("ParameterValue")) | ||
|
|
||
| log_group_name = f"logs-{short_uid()}" | ||
|
|
||
| # create the log group | ||
| aws_client.logs.create_log_group(logGroupName=log_group_name) | ||
| cleanups.append(lambda: aws_client.logs.delete_log_group(logGroupName=log_group_name)) | ||
|
|
||
| with pytest.raises(StackDeployError) as exc_info: | ||
| deploy_cfn_template( | ||
| template_path=os.path.join( | ||
| os.path.dirname(__file__), "../../../templates/logs_group.yml" | ||
| ), | ||
| parameters={"LogGroupName": log_group_name}, | ||
| ) | ||
|
|
||
| snapshot.match("failed-stack-describe", exc_info.value.describe_result) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: It could be useful to have the status reason if there was any.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I'm not sure I understand. There is no
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I'm talking about the StatusReason that should be in the CREATE_FAILED event of the Log Group. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: Nice consideration.