mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
* Added Network collection Shindo tests
* Fixed PBD and PIF tests descriptions
This commit is contained in:
parent
19b927ba4f
commit
df985aec67
3 changed files with 24 additions and 2 deletions
22
tests/xenserver/models/compute/networks_tests.rb
Normal file
22
tests/xenserver/models/compute/networks_tests.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
Shindo.tests('Fog::Compute[:xenserver] | Networks collection', ['networks']) do
|
||||
|
||||
conn = Fog::Compute[:xenserver]
|
||||
|
||||
tests('The networks collection') do
|
||||
networks = conn.networks.all
|
||||
|
||||
test('should not be empty') { !networks.empty? }
|
||||
|
||||
test('should be a kind of Fog::Compute::XenServer::Networks') { networks.kind_of? Fog::Compute::XenServer::Networks }
|
||||
|
||||
tests('should be able to reload itself').succeeds { networks.reload }
|
||||
|
||||
tests('should be able to get a model') do
|
||||
tests('by reference').succeeds {
|
||||
networks.get(networks.first.reference).is_a? Fog::Compute::XenServer::Network
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
Shindo.tests('Fog::Compute[:network] | network model', ['network']) do
|
||||
Shindo.tests('Fog::Compute[:xenserver] | PBD model', ['PBD']) do
|
||||
|
||||
pbds = Fog::Compute[:xenserver].pbds
|
||||
pbd = pbds.first
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Shindo.tests('Fog::Compute[:network] | network model', ['network']) do
|
||||
Shindo.tests('Fog::Compute[:xenserver] | PIF model', ['PIF']) do
|
||||
|
||||
pifs = Fog::Compute[:xenserver].pifs
|
||||
pif = pifs.first
|
||||
|
|
Loading…
Add table
Reference in a new issue