Closed ryanbrainard closed 7 years ago
Interestingly, this appears to be related to whether or not a paginator is defined for a method. If a paginator is defined, we're populating nil
, otherwise a stub value. I'm looking in to why this is.
@awood45 Thanks for looking into this. So it does sound like it's related to #1408. If so, does that mean that there are a lot of resources that need paginators defined?
That's very possible, though the inconsistency in stub behavior is interesting regardless.
Some updates, pagination has been enforced from root for future new APIs. Yet for those existing APIs missing paginations, we might still need to do manual works to fix those.
Free feel to open new issue if any pagination behavior missing causes unpleasant experience for you, we will fix those. Apology for those inconsistencies so far. Closing, feel free to reopen with further comments or questions. Thanks!
Spun off from https://github.com/aws/aws-sdk-ruby/issues/1408
When stubbing responses, the default value of the
next_token
is inconsistent. Sometimes it isnil
, sometimes it is"String"
, and sometimes it is"NextToken"
. See the example below on the EC2 client:The
"String"
vs"NextToken"
distinction is immaterial, but the fact that some of them arenil
means some resource types page (indefinitely) by default and some do not. I know that thestub_responses
can be overridden with a hash (and that's how I've worked around it), but it is unfortunate thatstub_responses: true
doesn't work consistently one way or another.If I could choose, I think that the
next_token
should benil
by default. This reason is that if you aren't explicitly testing pagination, it just works. You get one page and you're done. If you are testing pagination, you'll need to override with a hash either way to 1) force the next page and then 2) break out of the loop, and I would much rather only have to override when I'm explicitly testing pagination. For example: