1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

tests passing

This commit is contained in:
nightshade427 2011-03-17 16:12:31 -04:00 committed by Nicholas Ricketts
parent 859ba90f63
commit 1b887f3608
2 changed files with 30 additions and 3 deletions

View file

@ -0,0 +1,27 @@
Shindo.tests('Linode::Compute | kernel requests', ['linode']) do
@kernels_format = Linode::Compute::Formats::BASIC.merge({
'DATA' => [{
'LABEL' => String,
'ISXEN' => Integer,
'ISPVOPS' => Integer,
'KERNELID' => Integer
}]
})
tests('success') do
@kernel_id = nil
tests('#avail_kernels').formats(@kernels_format) do
pending if Fog.mocking?
data = Linode[:compute].avail_kernels.body
@kernel_id = data['DATA'].first['KERNELID']
data
end
tests("@avail_kernels(#{@kernel_id})").formats(@kernels_format) do
pending if Fog.mocking?
Linode[:compute].avail_kernels(@kernel_id).body
end
end
end

View file

@ -53,7 +53,7 @@ Shindo.tests('Linode::Compute | linode requests', ['linode']) do
end
tests('#linode_list').formats(@linodes_format) do
pending if Fog.mocking?
pending if Fog.mocking?
Linode[:compute].linode_list.body
end
@ -70,12 +70,12 @@ Shindo.tests('Linode::Compute | linode requests', ['linode']) do
tests('failure') do
tests('#linode_reboot(0)').raises(Fog::Linode::Compute::NotFound) do
tests('#linode_reboot(0)').raises(Fog::Linode::Compute::Error) do
pending if Fog.mocking?
Linode[:compute].linode_reboot(0)
end
tests('#linode_delete(0)').raises(Fog::Linode::Compute::NotFound) do
tests('#linode_delete(0)').raises(Fog::Linode::Compute::Error) do
pending if Fog.mocking?
Linode[:compute].linode_delete(0)
end