From f77f87d1d341b11d2e16c9672ca19c79925b110d Mon Sep 17 00:00:00 2001 From: Mike Hagedorn Date: Mon, 11 Aug 2014 16:46:56 -0400 Subject: [PATCH] dont run a real test if the mocks are enabled --- tests/hp/storage_tests.rb | 49 +++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/tests/hp/storage_tests.rb b/tests/hp/storage_tests.rb index ec8c8b055..48c053668 100644 --- a/tests/hp/storage_tests.rb +++ b/tests/hp/storage_tests.rb @@ -1,25 +1,28 @@ -Shindo.tests('Fog::Storage::HP', ['hp', 'storage']) do - credentials = { - :auth_token => 'auth_token', - :endpoint_url => 'http://127.0.0.1/path/', - :cdn_endpoint_url => 'http://127.0.0.1/cdnpath/', - :service_catalog => { - :"Object Storage" => { - :zone => 'http://127.0.0.1/path/'}, - :"CDN" => { - :zone => 'http://127.0.0.1/cdnpath/'}}, - :expires => (DateTime.now + 1).to_s - } - options = { - :hp_access_key => 'key', - :hp_secret_key => 'secret', - :hp_tenant_id => 'tenant', - :hp_avl_zone => 'zone', - :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) - conn.credentials +unless ENV["FOG_MOCK"] == "true" + Shindo.tests('Fog::Storage::HP', ['hp', 'storage']) do + credentials = { + :auth_token => 'auth_token', + :endpoint_url => 'http://127.0.0.1/path/', + :cdn_endpoint_url => 'http://127.0.0.1/cdnpath/', + :service_catalog => { + :"Object Storage" => { + :zone => 'http://127.0.0.1/path/'}, + :"CDN" => { + :zone => 'http://127.0.0.1/cdnpath/'}}, + :expires => (DateTime.now + 1).to_s + } + options = { + :hp_access_key => 'key', + :hp_secret_key => 'secret', + :hp_tenant_id => 'tenant', + :hp_avl_zone => 'zone', + :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) + conn.credentials + end end end