Skip to content

APIGW: add SQS X-Amz-JSON test #12649

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

Merged
merged 1 commit into from
May 26, 2025
Merged

APIGW: add SQS X-Amz-JSON test #12649

merged 1 commit into from
May 26, 2025

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented May 20, 2025

Motivation

Adding a test for a previously untested case to verify support for JSON protocol via APIGW in SQS.

This test also adds proper validation of what is available in the VTL context. It seems we don't have major parity issues except the known "not returning nested dict", should be fixable with a special type in Python, and the fact that we can access requestOverride and responseOverride and their default.

Changes

  • add a test for SQS with new Amazon JSON protocol + context variables in the template

@bentsku bentsku added this to the 4.5 milestone May 20, 2025
@bentsku bentsku self-assigned this May 20, 2025
@bentsku bentsku added aws:apigateway Amazon API Gateway semver: patch Non-breaking changes which can be included in patch releases labels May 20, 2025
Copy link

Test Results - Preflight, Unit

21 601 tests   19 955 ✅  6m 5s ⏱️
     1 suites   1 646 💤
     1 files         0 ❌

Results for commit 9bdc3c6.

Copy link

LocalStack Community integration with Pro

    2 files      2 suites   18m 20s ⏱️
1 126 tests 1 061 ✅ 65 💤 0 ❌
1 128 runs  1 061 ✅ 67 💤 0 ❌

Results for commit 9bdc3c6.

Copy link

Test Results (amd64) - Acceptance

7 tests   5 ✅  3m 9s ⏱️
1 suites  2 💤
1 files    0 ❌

Results for commit 9bdc3c6.

Copy link

Test Results - Alternative Providers

593 tests   413 ✅  14m 49s ⏱️
  4 suites  180 💤
  4 files      0 ❌

Results for commit 9bdc3c6.

Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 21m 47s ⏱️
4 815 tests 4 277 ✅ 538 💤 0 ❌
4 821 runs  4 277 ✅ 544 💤 0 ❌

Results for commit 9bdc3c6.

@bentsku bentsku marked this pull request as ready for review May 20, 2025 18:21
@bentsku bentsku requested a review from cloutierMat as a code owner May 20, 2025 18:21
Copy link
Contributor

@cloutierMat cloutierMat left a comment

Choose a reason for hiding this comment

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

🚀 Awesome thanks for the added test! Good to expand our test suite for aws implementation! 💪

authorizationType="NONE",
)

# we need to inline the JSON object because VTL does not handle newlines very well :/
Copy link
Contributor

Choose a reason for hiding this comment

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

😢 VTL Can be a pain like that!

Comment on lines +114 to +116
"responseOverride": {
"header": ""
},
Copy link
Contributor

Choose a reason for hiding this comment

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

observation: 👀 status is not present by default? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes apparently so! We should also add a test fetching the status if not been set, maybe it returns an empty string? I was also surprised by this... 👀

@bentsku bentsku merged commit bae7a0e into master May 26, 2025
64 checks passed
@bentsku bentsku deleted the add-sqs-test-apigw branch May 26, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:apigateway Amazon API Gateway semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants