fix sns duplicated tags + validate against AWS #6571
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a small bug where we would allow duplicates when tagging a SNS resource.
I stumbled onto another issue: when snapshot-matching the Exception raised by duplicated key, a
message
field would be added to the body of the response with Localstack, which is not present in AWS.Example:
"duplicate-key-error": { "Error": { "Type": "Sender", "Code": "InvalidParameter", "Message": "Invalid parameter: Duplicated keys are not allowed." }, + "message": "Invalid parameter: Duplicated keys are not allowed." "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 400 } }
The
message
field is not present in the recorded message.cc\ @alexrashed @thrau
Sneaked a small change in a test concerning a fake ARN which would raise the wrong Exception in AWS. Validated more tests against AWS as well.