1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #2142 from nosborn/vcloud_director_tests

[vcloud_director] Integrate tests
This commit is contained in:
Wesley Beary 2013-09-16 06:32:55 -07:00
commit 933a8d3355
9 changed files with 89 additions and 87 deletions

View file

@ -82,6 +82,9 @@ if Fog.mock?
:vcloud_host => 'vcloud_host',
:vcloud_password => 'vcloud_password',
:vcloud_username => 'vcloud_username',
:vcloud_director_host => 'vcloud_director_host',
:vcloud_director_password => 'vcloud_director_password',
:vcloud_director_username => 'vcloud_director_username',
:voxel_api_key => 'voxel_api_key',
:voxel_api_secret => 'voxel_api_secret',
:zerigo_email => 'zerigo_email',

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | catalog_items", ['all']) do
Shindo.tests("Compute::VcloudDirector | catalog_items", ['vclouddirector', 'all']) do
pending if Fog.mocking?
tests("#There is more than one catalog").returns(true){ catalog.catalog_items.size >= 1 }

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | catalogs", ['all']) do
Shindo.tests("Compute::VcloudDirector | catalogs", ['vclouddirector', 'all']) do
pending if Fog.mocking?
tests("#There is one or more catalog").returns(true){ organization.catalogs.size >= 1 }

View file

@ -12,8 +12,7 @@ def boolean?(item)
end
def vcloud_director
@vcloud_director ||= Fog::Compute::VcloudDirector.new(:vcloud_director_username => "#{ENV['IMEDIDATA_COM_USERNAME']}@devops",
:vcloud_director_password => ENV['IMEDIDATA_COM_PASSWORD'],
@vcloud_director ||= Fog::Compute::VcloudDirector.new(
:vcloud_director_host => 'devlab.mdsol.com',
:vcloud_director_api_version => '5.1',
:connection_options => {
@ -56,7 +55,6 @@ def vapp
vapps.detect {|vapp| vapp.vms.size >= 1 }
end
def the_network
@network ||= organization.networks.get_by_name(NETWORK_NAME)
end

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | organizations", ['all']) do
Shindo.tests("Compute::VcloudDirector | organizations", ['vclouddirector', 'all']) do
pending if Fog.mocking?
organizations = vcloud_director.organizations
tests("#There is one organization").returns(1){ organizations.size }

View file

@ -11,9 +11,10 @@ TAGS = { :company => "acme", :environment => "testing" }
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | vapp", ['creation']) do
Shindo.tests("Compute::VcloudDirector | vapp", ['vclouddirector', 'creation']) do
pending if Fog.mocking?
tests("#it creates a vApp from a catalog item").returns(true){ the_catalog_item.instantiate(VAPP_NAME, { :network_id => the_network.id, :network_name => NETWORK_NAME}) }
pending # FIXME! fails after 790ed63
vapp = vapps.get_by_name(VAPP_NAME)
tests("#Finds the just created vApp").returns(VAPP_NAME) { vapp.name }
tests("#it has one vm").returns(1) { vapp.vms.size}

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | vapps", ['all']) do
Shindo.tests("Compute::VcloudDirector | vapps", ['vclouddirector', 'all']) do
pending if Fog.mocking?
tests("#There is more than one vapp").returns(true){ vdc.vapps.size >= 1 }

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | vdcs", ['all']) do
Shindo.tests("Compute::VcloudDirector | vdcs", ['vclouddirector', 'all']) do
pending if Fog.mocking?
tests("#There is one or more vdc").returns(true){ organization.vdcs.size >= 1 }

View file

@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | vms", ['all']) do
Shindo.tests("Compute::VcloudDirector | vms", ['vclouddirector', 'all']) do
pending if Fog.mocking?
vapp = vapps.detect {|vapp| vapp.vms.size >= 1 }