-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
APIGW: implement UpdateMethodResponse and add lifecycle and negative tests for MethodResponse #12821
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
base: master
Are you sure you want to change the base?
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 18m 8s ⏱️ - 1h 28m 10s Results for commit f41a5cb. ± Comparison against base commit a6ec498. This pull request removes 3762 and adds 6 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 35m 45s ⏱️ Results for commit f41a5cb. ♻️ This comment has been updated with latest results. |
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.
This is great work! Very nice, and very nice implementation of the update_method_response
operation. This is looking really good!
I only have a few questions and comments, one is unrelated to your PR directly but is something that was set before but that you can update to make your life easier 👌
Only have one question regarding one case where the parameter didn't exist before and where we could maybe raise an unhandled KeyError
, we could cover this with an additional test case.
Once this is addressed, we're good to merge! 🚀 Nice work
localstack-core/localstack/services/apigateway/legacy/provider.py
Outdated
Show resolved
Hide resolved
localstack-core/localstack/services/apigateway/legacy/provider.py
Outdated
Show resolved
Hide resolved
Since this PR was opened very recently, if it is really going into tomorrow's 4.6 release, please make sure to do so before the freeze, and to create a highlight and a docs board entry if applicable :) |
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.
LGTM! Thanks for addressing the comments super fast, and adding even more validation, this looks great! Thank you so much for adding this previously unsupported operation! 🙏
if method_response.response_models is None: | ||
method_response.response_models = {} | ||
if method_response.response_parameters is None: | ||
method_response.response_parameters = {} |
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.
nice catch! great thinking 👌
Motivation
Add the implementation of the
UpdateMethodResponse
operation in the API Gateway v1 provider, and improve the test coverage for MethodResponse.Changes
Implemented UpdateMethodResponse in the API Gateway v1 provider.
Added validation logic for:
test_lifecycle_method_response
test_update_method_response
test_update_method_response_negative_tests
test_update_method_response_wrong_operations
test_update_method_wrong_param_names
test_update_method_lack_response_parameters_and_models