2010-12-06 09:50:59 -05:00
|
|
|
Shindo.tests('Brightbox::Compute | zone requests', ['brightbox']) do
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
tests("#list_zones").formats(Brightbox::Compute::Formats::Collection::ZONES) do
|
|
|
|
pending if Fog.mocking?
|
|
|
|
data = Brightbox[:compute].list_zones
|
2010-12-06 09:50:59 -05:00
|
|
|
@zone_id = data.first["id"]
|
|
|
|
data
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#get_zone('#{@zone_id}')").formats(Brightbox::Compute::Formats::Full::ZONE) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2010-12-06 09:50:59 -05:00
|
|
|
Brightbox[:compute].get_zone(@zone_id)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
tests("#get_zone('zon-00000')").raises(Excon::Errors::NotFound) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2010-12-06 09:50:59 -05:00
|
|
|
Brightbox[:compute].get_zone('zon-00000')
|
|
|
|
end
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
tests("#get_zone").raises(ArgumentError) do
|
|
|
|
pending if Fog.mocking?
|
|
|
|
Brightbox[:compute].get_zone
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
2010-12-30 16:04:19 -05:00
|
|
|
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|