2011-06-16 16:28:54 -07:00
|
|
|
Shindo.tests('Fog::Compute[:bluebox] | template requests', ['bluebox']) do
|
2010-06-03 21:32:59 -07:00
|
|
|
|
|
|
|
@template_format = {
|
|
|
|
'created' => String,
|
|
|
|
'description' => String,
|
|
|
|
'id' => String,
|
|
|
|
'public' => Fog::Boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2011-06-22 14:14:30 -07:00
|
|
|
@template_id = '03807e08-a13d-44e4-b011-ebec7ef2c928' # Ubuntu LTS 10.04 64bit
|
2010-06-03 21:32:59 -07:00
|
|
|
|
|
|
|
tests("get_template('#{@template_id}')").formats(@template_format) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:bluebox].get_template(@template_id).body
|
2010-06-03 21:32:59 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("get_templates").formats([@template_format]) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:bluebox].get_templates.body
|
2010-06-03 21:32:59 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2011-06-16 16:28:54 -07:00
|
|
|
tests("get_template('00000000-0000-0000-0000-000000000000')").raises(Fog::Compute::Bluebox::NotFound) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:bluebox].get_template('00000000-0000-0000-0000-000000000000')
|
2010-06-03 21:32:59 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|