-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Can't Stub attribute values with Aws::DynamoDB::Client. #770
Comments
I spent some time working on this. I started by working on a patch that would convert the simplified attribute value formats back into the serialized format with types. This would ensure the response stubbing plugin would succeed at validating the data. Followed by that I had to then also reverse the data format because the normal response handlers were not firing. This was a code-smell to me. The response stubbing plugin correctly exercises all of the request handlers that build the request. Once it reaches the send handler it simply sets the response data and then returns. This prevents any of response handlers from being exercised. There was a related issue in the previous repo (amazon-archives/aws-sdk-core-ruby#197) where the response stub skipped over the response handlers, preventing stubs that sets a response target from sending data to the target IO object. This specific limitation was addressed then. I can certainly address this new bug with not supporting attribute values but then I feel like there will be something else in the future. I think the correct way to resolve this issue is to re-work the response stubbing to take the stub data and to marshal it down to an actual HTTP response with headers, status code and a body. By doing this all of the response handlers will fire as normally ensuring that all of the service customizations work as intended. I'm jotting down these notes here. I'm not sure I have time to do the feature work required right now and I want a log of what I discovered. |
@trevorrowe thanks very much for fixing this. |
No problem! Thanks for being patient. The new response stubbing implementation should be much more reliable. Let me know if anything does not work as intended. |
See original issue for more information: amazon-archives/aws-sdk-core-ruby#218
The text was updated successfully, but these errors were encountered: