1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|compute] fixes for mocks tests

This commit is contained in:
geemus 2011-09-23 16:53:01 -05:00
parent d3073af15a
commit 66ed4aa98b
3 changed files with 7 additions and 1 deletions

View file

@ -49,7 +49,7 @@ module Fog
# user_data=nil
# >
#
def initialize(attributes)
self.filters ||= {}
super

View file

@ -12,6 +12,11 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
@instance = collection.create(params)
end
# FIXME: work around for timing issue on AWS describe_instances mocks
if Fog.mocking? && @instance.respond_to?(:ready?)
@instance.wait_for { ready? }
end
tests("#all").succeeds do
pending if Fog.mocking? && !mocks_implemented
collection.all

View file

@ -4,6 +4,7 @@ def server_tests(connection, params = {}, mocks_implemented = true)
tests('#reload').returns(true) do
pending if Fog.mocking? && !mocks_implemented
@instance.wait_for { ready? }
identity = @instance.identity
!identity.nil? && identity == @instance.reload.identity
end