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

[rackspace] setting rackspace_region to nil in default tests to override any settings loaded via Fog.credentials

This commit is contained in:
Kyle Rames 2013-10-16 10:24:06 -05:00
parent 2c64c7be7f
commit 00b608090d
8 changed files with 8 additions and 8 deletions

View file

@ -79,7 +79,7 @@ Shindo.tests('Fog::Rackspace::BlockStorage', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Rackspace::BlockStorage.new
@service = Fog::Rackspace::BlockStorage.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host =~ /dfw/) != nil }
@service.list_volumes

View file

@ -76,7 +76,7 @@ Shindo.tests('Fog::CDN::Rackspace', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::CDN::Rackspace.new
@service = Fog::CDN::Rackspace.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true, "uses DFW") { (@service.instance_variable_get("@uri").host =~ /cdn1/) != nil }
@service.get_containers

View file

@ -65,7 +65,7 @@ Shindo.tests('Rackspace | Compute', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Compute::Rackspace.new
@service = Fog::Compute::Rackspace.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host == 'servers.api.rackspacecloud.com') != nil }
@service.list_flavors

View file

@ -78,7 +78,7 @@ Shindo.tests('Fog::Compute::RackspaceV2', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Compute::RackspaceV2.new
@service = Fog::Compute::RackspaceV2.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host =~ /dfw/) != nil }
@service.list_flavors

View file

@ -79,7 +79,7 @@ Shindo.tests('Fog::Rackspace::Databases', ['rackspace']) do |variable|
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Rackspace::Databases.new
@service = Fog::Rackspace::Databases.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host =~ /dfw/) != nil }
@service.flavors

View file

@ -69,7 +69,7 @@ Shindo.tests('Fog::DNS::Rackspace', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::DNS::Rackspace.new
@service = Fog::DNS::Rackspace.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(false, "path populated") { @service.instance_variable_get("@uri").host.nil? }
returns(true, "contains tenant id") { (@service.instance_variable_get("@uri").path =~ /\/v1\.0\/\d+$/) != nil} #dns does not error if tenant id is missing

View file

@ -78,7 +78,7 @@ Shindo.tests('Fog::Rackspace::LoadBalancers', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Rackspace::LoadBalancers.new
@service = Fog::Rackspace::LoadBalancers.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host =~ /dfw/) != nil }
@service.list_load_balancers

View file

@ -76,7 +76,7 @@ Shindo.tests('Rackspace | Storage', ['rackspace']) do
pending if Fog.mocking?
tests('no params').succeeds do
@service = Fog::Storage::Rackspace.new
@service = Fog::Storage::Rackspace.new :rackspace_region => nil
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
returns(true) { (@service.instance_variable_get("@uri").host =~ /dfw\d/) != nil }
@service.head_containers