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

[rackspace] pass connection_options onto identity service so we can auth behind a proxy

This commit is contained in:
Kyle Rames 2013-05-30 12:52:37 -05:00
parent c716044ed3
commit ee038e1da3
17 changed files with 63 additions and 25 deletions

View file

@ -47,11 +47,14 @@ Shindo.tests('Fog::DNS::Rackspace', ['rackspace']) do
pending if Fog.mocking?
tests('variables populated').succeeds do
@service = Fog::DNS::Rackspace.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v2.0'
@service = Fog::DNS::Rackspace.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v2.0', :connection_options => { :ssl_verify_peer => true }
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
returns(false, "identity service was used") { @service.instance_variable_get("@identity_service").nil? }
identity_service = @service.instance_variable_get("@identity_service")
returns(false, "identity service was used") { identity_service.nil? }
returns(true, "connection_options are passed") { identity_service.instance_variable_get("@connection_options").has_key?(:ssl_verify_peer) }
@service.list_domains
end
tests('custom endpoint') do