mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
25 lines
625 B
Ruby
25 lines
625 B
Ruby
Shindo.tests('HP::Network | networking network model', ['hp', 'networking', 'network']) do
|
|
|
|
model_tests(HP[:network].networks, {:name => 'fognetwork'}, true)
|
|
|
|
tests('success') do
|
|
|
|
tests('#create').succeeds do
|
|
attributes = {:name => 'my_network', :admin_state_up => true, :shared => false}
|
|
@network = HP[:network].networks.create(attributes)
|
|
@network.wait_for { ready? } unless Fog.mocking?
|
|
!@network.id.nil?
|
|
end
|
|
|
|
tests('#save').succeeds do
|
|
@network.name = 'my_network_upd'
|
|
@network.save
|
|
end
|
|
|
|
tests('#destroy').succeeds do
|
|
@network.destroy
|
|
end
|
|
|
|
end
|
|
|
|
end
|