fix(cloudwatch): return empty CompositeAlarms and LogAlarms from DescribeAlarms (#6363)
* fix(cloudwatch): return empty CompositeAlarms and LogAlarms from DescribeAlarms AWS sends every alarm collection even when it is empty. Floci only sent MetricAlarms, so the AWS CLI's text output printed a leading None line for each missing paginator result key. Closes #6362 * test(cloudwatch): check empty alarm collections in sdk-test-python instead of bats Drop the new AWS CLI bats file and assert the empty CompositeAlarms and LogAlarms lists in the existing describe_alarms test, as boto3 leaves an absent list out of the response. (cherry picked from commit 42f5019231b446c727d6c94def9d1445263de2d7)
This commit is contained in:
@@ -203,6 +203,8 @@ class TestCloudWatchAlarms:
|
||||
|
||||
alarm = next(a for a in alarms if a["AlarmName"] == alarm_name)
|
||||
assert alarm["StateValue"] == "INSUFFICIENT_DATA"
|
||||
assert response["CompositeAlarms"] == []
|
||||
assert response["LogAlarms"] == []
|
||||
finally:
|
||||
cloudwatch_client.delete_alarms(AlarmNames=[alarm_name])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user