mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vcloud_director|tests] Fix some edge cases.
This commit is contained in:
parent
005293e69f
commit
e94014d9c3
4 changed files with 6 additions and 5 deletions
|
@ -26,7 +26,7 @@ def organizations
|
||||||
end
|
end
|
||||||
|
|
||||||
def organization
|
def organization
|
||||||
organizations.first
|
@organization ||= organizations.get_by_name(vcloud_director.org_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def catalogs
|
def catalogs
|
||||||
|
|
|
@ -6,6 +6,7 @@ VCR.use_cassette(File.basename(__FILE__)) do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
|
|
||||||
medias = vdc.medias
|
medias = vdc.medias
|
||||||
|
pending if medias.all.empty?
|
||||||
media = medias.first
|
media = medias.first
|
||||||
|
|
||||||
tests('Compute::VcloudDirector | media') do
|
tests('Compute::VcloudDirector | media') do
|
||||||
|
|
|
@ -6,7 +6,7 @@ VCR.use_cassette(File.basename(__FILE__)) do
|
||||||
organizations = vcloud_director.organizations
|
organizations = vcloud_director.organizations
|
||||||
tests("#There is at least one organization").returns(true) { organizations.size >= 1 }
|
tests("#There is at least one organization").returns(true) { organizations.size >= 1 }
|
||||||
|
|
||||||
org = organizations.first
|
org = organizations.get_by_name(vcloud_director.org_name)
|
||||||
|
|
||||||
tests("Compute::VcloudDirector | organization") do
|
tests("Compute::VcloudDirector | organization") do
|
||||||
tests("#name").returns(String) { org.name.class }
|
tests("#name").returns(String) { org.name.class }
|
||||||
|
|
|
@ -9,9 +9,9 @@ Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) d
|
||||||
:is_inherited => Fog::Boolean,
|
:is_inherited => Fog::Boolean,
|
||||||
:gateway => String,
|
:gateway => String,
|
||||||
:netmask => String,
|
:netmask => String,
|
||||||
:dns1 => String,
|
:dns1 => Fog::Nullable::String,
|
||||||
:dns2 => String,
|
:dns2 => Fog::Nullable::String,
|
||||||
:dns_suffix => String,
|
:dns_suffix => Fog::Nullable::String,
|
||||||
:ip_ranges => [{
|
:ip_ranges => [{
|
||||||
:start_address => String,
|
:start_address => String,
|
||||||
:end_address => String
|
:end_address => String
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue