dont run a real test if the mocks are enabled

This commit is contained in:
Mike Hagedorn 2014-08-11 16:46:56 -04:00
parent 9534dd4a15
commit f77f87d1d3
1 changed files with 26 additions and 23 deletions

View File

@ -1,25 +1,28 @@
Shindo.tests('Fog::Storage::HP', ['hp', 'storage']) do unless ENV["FOG_MOCK"] == "true"
credentials = { Shindo.tests('Fog::Storage::HP', ['hp', 'storage']) do
:auth_token => 'auth_token', credentials = {
:endpoint_url => 'http://127.0.0.1/path/', :auth_token => 'auth_token',
:cdn_endpoint_url => 'http://127.0.0.1/cdnpath/', :endpoint_url => 'http://127.0.0.1/path/',
:service_catalog => { :cdn_endpoint_url => 'http://127.0.0.1/cdnpath/',
:"Object Storage" => { :service_catalog => {
:zone => 'http://127.0.0.1/path/'}, :"Object Storage" => {
:"CDN" => { :zone => 'http://127.0.0.1/path/'},
:zone => 'http://127.0.0.1/cdnpath/'}}, :"CDN" => {
:expires => (DateTime.now + 1).to_s :zone => 'http://127.0.0.1/cdnpath/'}},
} :expires => (DateTime.now + 1).to_s
options = { }
:hp_access_key => 'key', options = {
:hp_secret_key => 'secret', :hp_access_key => 'key',
:hp_tenant_id => 'tenant', :hp_secret_key => 'secret',
:hp_avl_zone => 'zone', :hp_tenant_id => 'tenant',
:hp_auth_uri => 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens', :hp_avl_zone => 'zone',
:credentials => credentials :hp_auth_uri => 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens',
} :credentials => credentials
tests('Test cached Storage credentials').returns(credentials) do }
conn = Fog::Storage::HP::Real.new(options) tests('Test cached Storage credentials').returns(credentials) do
conn.credentials
conn = Fog::Storage::HP::Real.new(options)
conn.credentials
end
end end
end end