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

26 lines
815 B
Ruby
Raw Normal View History

2013-03-27 14:44:08 -04:00
Shindo.tests('Fog::Storage::HP', ['hp', 'storage']) do
2013-03-27 10:53:16 -04:00
credentials = {
:auth_token => 'auth_token',
:endpoint_url => 'http://127.0.0.1/path/',
2013-03-28 13:57:00 -04:00
:cdn_endpoint_url => 'http://127.0.0.1/cdnpath/',
2013-03-28 15:40:20 -04:00
:service_catalog => {
2013-03-28 13:57:00 -04:00
:"Object Storage" => {
:zone => 'http://127.0.0.1/path/'},
:"CDN" => {
:zone => 'http://127.0.0.1/cdnpath/'}},
2013-03-27 10:53:16 -04:00
:expires => (DateTime.now + 1).to_s
}
options = {
2013-03-28 13:57:00 -04:00
: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',
2013-03-27 10:53:16 -04:00
:credentials => credentials
}
tests('Test cached Storage credentials').returns(credentials) do
conn = Fog::Storage::HP::Real.new(options)
conn.credentials
end
end