mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
tests passing
This commit is contained in:
parent
859ba90f63
commit
1b887f3608
2 changed files with 30 additions and 3 deletions
27
tests/compute/requests/linode/kernel_tests.rb
Normal file
27
tests/compute/requests/linode/kernel_tests.rb
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue