diff --git a/tests/compute/helper.rb b/tests/compute/helper.rb index 7609344d7..13bfb56e2 100644 --- a/tests/compute/helper.rb +++ b/tests/compute/helper.rb @@ -82,6 +82,7 @@ def compute_providers :mocked => false }, :rackspace => { + :provider_attributes => { :version => :v1 }, :server_attributes => { :image_id => 49, # image 49 = Ubuntu 10.04 LTS (lucid) :name => "fog_#{Time.now.to_i}" diff --git a/tests/compute/models/flavors_tests.rb b/tests/compute/models/flavors_tests.rb index e40545f1e..a0702db37 100644 --- a/tests/compute/models/flavors_tests.rb +++ b/tests/compute/models/flavors_tests.rb @@ -4,7 +4,9 @@ for provider, config in compute_providers Shindo.tests("Fog::Compute[:#{provider}] | flavors", [provider.to_s]) do - flavors_tests(Fog::Compute[provider], (config[:flavors_attributes] || {}), config[:mocked]) + provider_attributes = config[:provider_attributes] || {} + provider_attributes.merge!(:provider => provider) + flavors_tests(Fog::Compute.new(provider_attributes), (config[:flavors_attributes] || {}), config[:mocked]) end diff --git a/tests/compute/models/server_tests.rb b/tests/compute/models/server_tests.rb index f877f168a..294b8269a 100644 --- a/tests/compute/models/server_tests.rb +++ b/tests/compute/models/server_tests.rb @@ -2,7 +2,9 @@ for provider, config in compute_providers Shindo.tests("Fog::Compute[:#{provider}] | server", [provider.to_s]) do - server_tests(Fog::Compute[provider], (config[:server_attributes] || {}), config[:mocked]) do + provider_attributes = config[:provider_attributes] || {} + provider_attributes.merge!(:provider => provider) + server_tests(Fog::Compute.new(provider_attributes), (config[:server_attributes] || {}), config[:mocked]) do if Fog.mocking? && !config[:mocked] pending diff --git a/tests/compute/models/servers_tests.rb b/tests/compute/models/servers_tests.rb index a11db78d5..4be329ca7 100644 --- a/tests/compute/models/servers_tests.rb +++ b/tests/compute/models/servers_tests.rb @@ -3,7 +3,9 @@ for provider, config in compute_providers Shindo.tests("Fog::Compute[:#{provider}] | servers", [provider.to_s]) do - servers_tests(Fog::Compute[provider], (config[:server_attributes] || {}), config[:mocked]) + provider_attributes = config[:provider_attributes] || {} + provider_attributes.merge!(:provider => provider) + servers_tests(Fog::Compute.new(provider_attributes), (config[:server_attributes] || {}), config[:mocked]) end