-
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 responses for SQS get_queue_attributes
#1099
Comments
@manabusakai Your usage is correct. This bug was fixed in the previous release. You can see a related issue here: #1097 If you update to v2.2.18, then this should be fixed. |
@trevorrowe Thanks for the quick reply! Update to v2.2.18, I tried it. I found a another issue. Good when attribute is one. 😄 client.stub_responses(:get_queue_attributes, attributes: {
'QueueArn' => 'arn:aws:sqs:ap-northeast-1:123456789123:test',
})
p client.get_queue_attributes({
queue_url: 'https://sqs.ap-northeast-1.amazonaws.com/012345678901/test',
attribute_names: ['All'],
}).attributes
# result -> {"QueueArn"=>"arn:aws:sqs:ap-northeast-1:123456789123:test"} Not good when attribute is two or more. 😢 client.stub_responses(:get_queue_attributes, attributes: {
'QueueArn' => 'arn:aws:sqs:ap-northeast-1:123456789123:test',
'ApproximateNumberOfMessages' => '0',
})
p client.get_queue_attributes({
queue_url: 'https://sqs.ap-northeast-1.amazonaws.com/012345678901/test',
attribute_names: ['All'],
}).attributes
# result -> {"QueueArnApproximateNumberOfMessages"=>"arn:aws:sqs:ap-northeast-1:123456789123:test0"} |
Good catch. I expanded the test to have multiple values and fixed the bug. This should go out with todays release. |
@trevorrowe Thank you! 👍 |
Hi,
I'm having an issue with stubbing responses for the SQS
get_queue_attributes
request.This is the sample code.
However, the result will be empty.
The other operation is no problem.
Is my usage is incorrect?
The text was updated successfully, but these errors were encountered: