-
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
Response not written to file when using :response_target with stubbed_responses: true #1882
Comments
This looks like it could be related to #823 and amazon-archives/aws-sdk-core-ruby#197 |
Hello @andrew-newell, Thanks for reporting this issue. Both of the issues you point to are for the prior version of the SDK. Stubbing for the current version does not support writing the response_target to a file. I'm marking this a feature request. |
@srchase Can you point me to the documentation for this behavior please? |
@andrew-newell Can you give this a try instead?
|
You can check out this blog post by @awood45 for some additional reading on Advanced client stubbing in the AWS SDK for Ruby Version 3. You'll likely be able to accomplish most things with stub_responses. That allows you to set the data or errors that will get returned on the normal client calls you make elsewhere. |
Yep, that works. Thanks for your help. |
Issue description
When I use
stub_responses: true
when creating a client for S3, I expect the behaviorof
response_target
options to be the same as a client without this option.Expected behavior
If a response is stubbed, it is still a response and I would assert that code relying on the response body
to be written to a file should work whether the s3 client is stubbed or not.
Current behavior
When the client has
stub_responses: true
the file is never written to disk.Gem name
aws-sdk-s3 (1.20.0)
Version of Ruby, OS environment
macOS High Sierra 10.13.6, ruby-2.5.1
Code snippets / steps to reproduce
The text was updated successfully, but these errors were encountered: