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
|
2011-05-24 17:59:48 -04:00
|
|
|
pending if Fog.mocking? && !mocks_implemented
|
2011-09-23 17:53:01 -04:00
|
|
|
@instance.wait_for { ready? }
|
2011-05-13 16:43:12 -04:00
|
|
|
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
|