2012-02-16 21:43:25 -05:00
|
|
|
Shindo.tests('Fog::Compute[:bluebox] | location requests', ['bluebox']) do
|
2014-05-26 09:44:18 -04:00
|
|
|
|
2012-02-16 21:43:25 -05:00
|
|
|
@location_format = {
|
|
|
|
'id' => String,
|
|
|
|
'description' => String
|
|
|
|
}
|
2014-05-26 09:44:18 -04:00
|
|
|
|
2012-02-16 21:43:25 -05:00
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
@location_id = compute_providers[:bluebox][:server_attributes][:location_id]
|
|
|
|
|
2012-02-16 21:47:12 -05:00
|
|
|
tests("get_location('#{@location_id}')").formats(@location_format) do
|
2012-02-16 21:43:25 -05:00
|
|
|
pending if Fog.mocking?
|
|
|
|
Fog::Compute[:bluebox].get_location(@location_id).body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("get_locations").formats([@location_format]) do
|
|
|
|
pending if Fog.mocking?
|
|
|
|
Fog::Compute[:bluebox].get_locations.body
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
tests("get_location('00000000-0000-0000-0000-000000000000')").raises(Fog::Compute::Bluebox::NotFound) do
|
|
|
|
pending if Fog.mocking?
|
|
|
|
Fog::Compute[:bluebox].get_location('00000000-0000-0000-0000-000000000000')
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2014-05-26 09:35:26 -04:00
|
|
|
end
|