2011-06-16 16:28:54 -07:00
|
|
|
Shindo.tests('Fog::Compute[:brightbox] | zone requests', ['brightbox']) do
|
2010-12-06 14:50:59 +00:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2011-09-29 10:15:03 +01:00
|
|
|
tests("#list_zones") do
|
2010-12-17 16:49:22 -08:00
|
|
|
pending if Fog.mocking?
|
2011-09-29 10:15:03 +01:00
|
|
|
result = Fog::Compute[:brightbox].list_zones
|
|
|
|
@zone_id = result.first["id"]
|
2012-02-06 10:49:18 +00:00
|
|
|
formats(Brightbox::Compute::Formats::Collection::ZONES, false) { result }
|
2010-12-06 14:50:59 +00:00
|
|
|
end
|
|
|
|
|
2011-09-29 10:15:03 +01:00
|
|
|
tests("#get_zone('#{@zone_id}')") do
|
2010-12-17 16:49:22 -08:00
|
|
|
pending if Fog.mocking?
|
2011-09-29 10:15:03 +01:00
|
|
|
result = Fog::Compute[:brightbox].get_zone(@zone_id)
|
2012-02-06 10:49:18 +00:00
|
|
|
formats(Brightbox::Compute::Formats::Full::ZONE, false) { result }
|
2010-12-06 14:50:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
tests("#get_zone('zon-00000')").raises(Excon::Errors::NotFound) do
|
2010-12-17 16:49:22 -08:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:brightbox].get_zone('zon-00000')
|
2010-12-06 14:50:59 +00:00
|
|
|
end
|
|
|
|
|
2010-12-17 16:49:22 -08:00
|
|
|
tests("#get_zone").raises(ArgumentError) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:brightbox].get_zone
|
2010-12-06 14:50:59 +00:00
|
|
|
end
|
2010-12-30 13:04:19 -08:00
|
|
|
|
2010-12-06 14:50:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|