mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
fixes for pending shared tests
This commit is contained in:
parent
bc91f00f63
commit
dc5abb7d3d
3 changed files with 15 additions and 4 deletions
|
@ -7,7 +7,9 @@ def flavors_tests(connection, params = {}, mocks_implemented = true)
|
|||
connection.flavors.all
|
||||
end
|
||||
|
||||
@identity = connection.flavors.first.identity
|
||||
if !Fog.mocking? || mocks_implemented
|
||||
@identity = connection.flavors.first.identity
|
||||
end
|
||||
|
||||
tests("#get('#{@identity}')").succeeds do
|
||||
pending if Fog.mocking? && !mocks_implemented
|
||||
|
@ -18,7 +20,9 @@ def flavors_tests(connection, params = {}, mocks_implemented = true)
|
|||
|
||||
tests('failure') do
|
||||
|
||||
invalid_flavor_identity = connection.flavors.first.identity.gsub(/\w/, '0')
|
||||
if !Fog.mocking? || mocks_implemented
|
||||
invalid_flavor_identity = connection.flavors.first.identity.gsub(/\w/, '0')
|
||||
end
|
||||
|
||||
tests("#get('#{invalid_flavor_identity}')").returns(nil) do
|
||||
pending if Fog.mocking? && !mocks_implemented
|
||||
|
|
|
@ -5,11 +5,14 @@ def server_tests(connection, params = {}, mocks_implemented = true)
|
|||
responds_to([:ready?, :state])
|
||||
|
||||
tests('#reboot').succeeds do
|
||||
pending if Fog.mocking? && !mocks_implemented
|
||||
@instance.wait_for { ready? }
|
||||
@instance.reboot
|
||||
end
|
||||
|
||||
@instance.wait_for { ready? }
|
||||
if !Fog.mocking? || mocks_implemented
|
||||
@instance.wait_for { ready? }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
def servers_tests(connection, params, mocks_implemented = true)
|
||||
|
||||
collection_tests(connection.servers, params, mocks_implemented) do
|
||||
@instance.wait_for { ready? }
|
||||
|
||||
if !Fog.mocking? || mocks_implemented
|
||||
@instance.wait_for { ready? }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue