mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
b7b7f51b0b
Fog::Compute connection was called outside of the Shindo blocks and failing if rackspace credentials were not present.
24 lines
674 B
Ruby
24 lines
674 B
Ruby
Shindo.tests('Fog::Compute::RackspaceV2 | servers', ['rackspace']) do
|
|
connection = Fog::Compute::RackspaceV2.new
|
|
flavor_id = Fog.credentials[:rackspace_flavor_id] || connection.flavors.first.id
|
|
image_id = Fog.credentials[:rackspace_image_id] || connection.images.first.id
|
|
|
|
options = {
|
|
:name => "fog_server_#{Time.now.to_i.to_s}",
|
|
:flavor_id => flavor_id,
|
|
:image_id => image_id
|
|
}
|
|
collection_tests(connection.servers, options, true) do
|
|
@instance.wait_for { ready? }
|
|
end
|
|
|
|
tests("#bootstrap").succeeds do
|
|
pending if Fog.mocking?
|
|
@server = connection.servers.bootstrap(options)
|
|
end
|
|
|
|
if @server
|
|
@server.destroy
|
|
end
|
|
|
|
end
|