2010-11-12 02:01:18 -05:00
|
|
|
def server_tests(connection, params = {}, mocks_implemented = true)
|
|
|
|
|
|
|
|
model_tests(connection.servers, params, mocks_implemented) do
|
|
|
|
|
2011-05-13 16:43:12 -04:00
|
|
|
tests('#reload').returns(true) do
|
|
|
|
identity = @instance.identity
|
|
|
|
!identity.nil? && identity == @instance.reload.identity
|
|
|
|
end
|
|
|
|
|
2010-11-12 02:01:18 -05:00
|
|
|
responds_to([:ready?, :state])
|
|
|
|
|
|
|
|
tests('#reboot').succeeds do
|
2010-11-16 14:47:05 -05:00
|
|
|
pending if Fog.mocking? && !mocks_implemented
|
2010-11-12 02:01:18 -05:00
|
|
|
@instance.wait_for { ready? }
|
|
|
|
@instance.reboot
|
|
|
|
end
|
|
|
|
|
2010-11-16 14:47:05 -05:00
|
|
|
if !Fog.mocking? || mocks_implemented
|
|
|
|
@instance.wait_for { ready? }
|
|
|
|
end
|
2010-11-12 02:01:18 -05:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|