Skip to content

fix sns duplicated tags + validate against AWS#6571

Merged
bentsku merged 2 commits intomasterfrom
fix-sns-duplicate-tags
Aug 2, 2022
Merged

fix sns duplicated tags + validate against AWS#6571
bentsku merged 2 commits intomasterfrom
fix-sns-duplicate-tags

Conversation

@bentsku
Copy link
Contributor

@bentsku bentsku commented Aug 1, 2022

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.

@bentsku bentsku requested a review from thrau August 1, 2022 15:36
@bentsku bentsku temporarily deployed to localstack-ext-tests August 1, 2022 15:37 Inactive
@bentsku bentsku temporarily deployed to localstack-ext-tests August 1, 2022 15:40 Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! great test

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 91.587% when pulling 6370d1f on fix-sns-duplicate-tags into 1b7eef5 on master.

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 8m 32s ⏱️ - 1m 2s
1 156 tests ±0  1 116 ✔️ ±0  40 💤 ±0  0 ±0 
1 513 runs  ±0  1 444 ✔️ ±0  69 💤 ±0  0 ±0 

Results for commit 6370d1f. ± Comparison against base commit 1b7eef5.

@bentsku bentsku merged commit 9e5bb81 into master Aug 2, 2022
@bentsku bentsku deleted the fix-sns-duplicate-tags branch August 2, 2022 08:49
@localstack localstack locked and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants