1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/compute/requests/linode/distribution_tests.rb

33 lines
897 B
Ruby
Raw Normal View History

2010-09-09 20:50:38 -04:00
Shindo.tests('Linode::Compute | distribution requests', ['linode']) do
2010-07-17 23:35:08 -04:00
2010-09-09 20:50:38 -04:00
@distributions_format = Linode::Compute::Formats::BASIC.merge({
2010-07-17 23:35:08 -04:00
'DATA' => [{
'CREATE_DT' => String,
'DISTRIBUTIONID' => Integer,
'IS64BIT' => Integer,
'LABEL' => String,
'MINIMAGESIZE' => Integer,
'REQUIRESPVOPSKERNEL' => Integer
}]
})
tests('success') do
@distribution_id = nil
tests('#avail_distributions').formats(@distributions_format) do
pending if Fog.mocking?
2010-09-09 20:50:38 -04:00
data = Linode[:compute].avail_distributions.body
2010-07-17 23:35:08 -04:00
@distribution_id = data['DATA'].first['DISTRIBUTIONID']
data
end
tests("@avail_distributions(#{@distribution_id})").formats(@distributions_format) do
pending if Fog.mocking?
2010-09-09 20:50:38 -04:00
Linode[:compute].avail_distributions(@distribution_id).body
2010-07-17 23:35:08 -04:00
end
end
end