2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:linode] | linodeplans requests', ['linode']) do
|
2010-07-17 23:35:08 -04:00
|
|
|
|
2010-09-09 20:50:38 -04:00
|
|
|
@linodeplans_format = Linode::Compute::Formats::BASIC.merge({
|
2014-05-26 09:44:18 -04:00
|
|
|
'DATA' => [{
|
2010-07-17 23:35:08 -04:00
|
|
|
'AVAIL' => {
|
|
|
|
'2' => Integer,
|
|
|
|
'3' => Integer,
|
|
|
|
'4' => Integer,
|
|
|
|
'6' => Integer,
|
2011-09-26 12:09:14 -04:00
|
|
|
'7' => Integer,
|
|
|
|
'8' => Integer
|
2010-07-17 23:35:08 -04:00
|
|
|
},
|
|
|
|
'DISK' => Integer,
|
|
|
|
'PLANID' => Integer,
|
|
|
|
'PRICE' => Float,
|
|
|
|
'RAM' => Integer,
|
|
|
|
'LABEL' => String,
|
2014-08-29 15:14:48 -04:00
|
|
|
'XFER' => Integer,
|
|
|
|
'CORES' => Integer
|
2010-07-17 23:35:08 -04:00
|
|
|
}]
|
|
|
|
})
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
@linodeplan_id = nil
|
|
|
|
|
|
|
|
tests('#avail_linodeplans').formats(@linodeplans_format) do
|
2010-10-13 20:54:14 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
data = Fog::Compute[:linode].avail_linodeplans.body
|
2010-07-17 23:35:08 -04:00
|
|
|
@linodeplan_id = data['DATA'].first['PLANID']
|
|
|
|
data
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#avail_linodeplans(#{@linodeplan_id})").formats(@linodeplans_format) do
|
2010-10-13 20:54:14 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:linode].avail_linodeplans(@linodeplan_id).body
|
2010-07-17 23:35:08 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|