Permalink
Browse files

[aws|elb] Failing test for load_balancers marker support.

  • Loading branch information...
1 parent 56403ea commit 7f37b9dd7995dd743c990816126d640d7a1bf062 @dpiddy dpiddy committed Apr 22, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −1 lib/fog/aws/requests/elb/describe_load_balancers.rb
  2. +7 −0 tests/aws/models/elb/model_tests.rb
View
2 lib/fog/aws/requests/elb/describe_load_balancers.rb
@@ -63,7 +63,7 @@ def describe_load_balancers(lb_names = [])
end.compact
else
self.data[:load_balancers].map { |lb, values| values.dup }
- end
+ end[0...400]
response = Excon::Response.new
response.status = 200
View
7 tests/aws/models/elb/model_tests.rb
@@ -94,6 +94,13 @@
tests("contains elb").returns(true) { elb_ids.include? elb_id }
end
+ if Fog.mocking?
+ tests('all marker support') do
+ extra_elb_ids = (1..1000).map {|n| Fog::AWS[:elb].load_balancers.create(:id => "#{elb_id}-extra-#{n}").id }
+ tests('returns all elbs').returns(true) { (extra_elb_ids - Fog::AWS[:elb].load_balancers.all.map {|e| e.id }).empty? }
+ end
+ end
+
tests('get') do
elb_get = Fog::AWS[:elb].load_balancers.get(elb_id)
tests('ids match').returns(elb_id) { elb_get.id }

0 comments on commit 7f37b9d

Please sign in to comment.