2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:bluebox] | template requests', ['bluebox']) do
|
2010-06-04 00:32:59 -04:00
|
|
|
|
|
|
|
@template_format = {
|
|
|
|
'created' => String,
|
|
|
|
'description' => String,
|
|
|
|
'id' => String,
|
2012-02-16 21:43:25 -05:00
|
|
|
'public' => Fog::Boolean,
|
|
|
|
'locations' => [ String ],
|
|
|
|
'status' => String
|
2010-06-04 00:32:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2012-02-16 21:43:25 -05:00
|
|
|
@template_id = compute_providers[:bluebox][:server_attributes][:image_id]
|
2010-06-04 00:32:59 -04:00
|
|
|
|
|
|
|
tests("get_template('#{@template_id}')").formats(@template_format) 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_template(@template_id).body
|
2010-06-04 00:32:59 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("get_templates").formats([@template_format]) 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_templates.body
|
2010-06-04 00:32:59 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2011-06-16 19:28:54 -04:00
|
|
|
tests("get_template('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_template('00000000-0000-0000-0000-000000000000')
|
2010-06-04 00:32:59 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|