2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:bluebox] | product requests', ['bluebox']) do
|
2010-09-09 20:50:38 -04:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
@product_id = '94fd37a7-2606-47f7-84d5-9000deda52ae' # 1 GB
|
|
|
|
|
|
|
|
tests("get_product('#{@product_id}')").formats(Bluebox::Compute::Formats::PRODUCT) do
|
2010-10-13 20:54:14 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:bluebox].get_product(@product_id).body
|
2010-09-09 20:50:38 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("get_products").formats([Bluebox::Compute::Formats::PRODUCT]) do
|
2010-10-13 20:54:14 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:bluebox].get_products.body
|
2010-09-09 20:50:38 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2011-06-16 19:28:54 -04:00
|
|
|
tests("get_product('00000000-0000-0000-0000-000000000000')").raises(Fog::Compute::Bluebox::NotFound) do
|
2010-10-13 20:54:14 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:bluebox].get_product('00000000-0000-0000-0000-000000000000')
|
2010-09-09 20:50:38 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|