diff --git a/tests/vcloud_director/models/compute/helper.rb b/tests/vcloud_director/models/compute/helper.rb index 9901aeaf1..f0708eaf9 100644 --- a/tests/vcloud_director/models/compute/helper.rb +++ b/tests/vcloud_director/models/compute/helper.rb @@ -26,7 +26,7 @@ def organizations end def organization - organizations.first + @organization ||= organizations.get_by_name(vcloud_director.org_name) end def catalogs diff --git a/tests/vcloud_director/models/compute/media_tests.rb b/tests/vcloud_director/models/compute/media_tests.rb index e9dcd7e2a..b854dba87 100644 --- a/tests/vcloud_director/models/compute/media_tests.rb +++ b/tests/vcloud_director/models/compute/media_tests.rb @@ -6,6 +6,7 @@ VCR.use_cassette(File.basename(__FILE__)) do pending if Fog.mocking? medias = vdc.medias + pending if medias.all.empty? media = medias.first tests('Compute::VcloudDirector | media') do diff --git a/tests/vcloud_director/models/compute/organizations_tests.rb b/tests/vcloud_director/models/compute/organizations_tests.rb index 9c77256da..408c9e77b 100644 --- a/tests/vcloud_director/models/compute/organizations_tests.rb +++ b/tests/vcloud_director/models/compute/organizations_tests.rb @@ -6,7 +6,7 @@ VCR.use_cassette(File.basename(__FILE__)) do organizations = vcloud_director.organizations 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("#name").returns(String) { org.name.class } diff --git a/tests/vcloud_director/requests/compute/network_tests.rb b/tests/vcloud_director/requests/compute/network_tests.rb index 7ad373da5..1c9931d3e 100644 --- a/tests/vcloud_director/requests/compute/network_tests.rb +++ b/tests/vcloud_director/requests/compute/network_tests.rb @@ -9,9 +9,9 @@ Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) d :is_inherited => Fog::Boolean, :gateway => String, :netmask => String, - :dns1 => String, - :dns2 => String, - :dns_suffix => String, + :dns1 => Fog::Nullable::String, + :dns2 => Fog::Nullable::String, + :dns_suffix => Fog::Nullable::String, :ip_ranges => [{ :start_address => String, :end_address => String