mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[xenserver|compute] added create_network tests
This commit is contained in:
parent
f78e99ab32
commit
34b55dce78
1 changed files with 20 additions and 0 deletions
20
tests/xenserver/requests/compute/create_network_tests.rb
Normal file
20
tests/xenserver/requests/compute/create_network_tests.rb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Shindo.tests('Fog::Compute[:xenserver] | create_network request', ['xenserver']) do
|
||||||
|
|
||||||
|
compute = Fog::Compute[:xenserver]
|
||||||
|
|
||||||
|
tests('success') do
|
||||||
|
test('#create_network') do
|
||||||
|
@ref = compute.create_network 'test-net'
|
||||||
|
!(compute.networks.find { |n| n.reference == @ref }).nil?
|
||||||
|
end
|
||||||
|
test('#create_network with description') do
|
||||||
|
# Destroy previously created network
|
||||||
|
compute.networks.get(@ref).destroy
|
||||||
|
@ref = compute.create_network 'test-net', :description => 'foo'
|
||||||
|
!(compute.networks.find { |n| n.description == 'foo' }).nil?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
compute.destroy_network @ref
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in a new issue