Skip to content

Commit

Permalink
Stubbed nil values for the describe instance calls.
Browse files Browse the repository at this point in the history
The default stub returns non-empty strings for all possible string
values. This causes the next token that trigger paging to appear
like there is a next response.

I updated your stubbs to use nil next tokens to avoid this issue.
Please feel free to open this as an issue against aws/aws-sdk-ruby as
this is a poor default experience.
  • Loading branch information
trevorrowe committed May 1, 2015
1 parent 8a160c2 commit 189dadf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/ec2_stub_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
before do
client.stub_responses(
:describe_instances, {
:next_token => nil,
:reservations => [{:instances=>[{:instance_id => "i-1", :state => {:name => "running"}, :tags =>[{:key => "Name", :value => "example-1" }]}]}]
}
)
Expand Down
4 changes: 3 additions & 1 deletion spec/instance_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
before do
ec2_client.stub_responses(
:describe_instances,
{ :reservations => [{ :instances => [
{
:next_token => nil,
:reservations => [{ :instances => [
{
:instance_id => "i-1",
:state => {:name => "running" },
Expand Down

0 comments on commit 189dadf

Please sign in to comment.