fog--fog/tests/hp/compute_tests.rb

23 lines
705 B
Ruby
Raw Normal View History

2013-03-27 18:44:08 +00:00
Shindo.tests('Fog::Compute::HP', ['hp', 'compute']) do
2013-03-27 14:53:16 +00:00
credentials = {
:auth_token => 'auth_token',
:endpoint_url => 'http://127.0.0.1/computepath/',
2013-03-28 19:40:20 +00:00
:service_catalog => {
2013-03-28 17:57:00 +00:00
:"Compute" => {
:zone => 'http://127.0.0.1/computepath/'}},
2013-03-27 14:53:16 +00:00
:expires => (DateTime.now + 1).to_s
}
options = {
2013-03-28 17:57:00 +00: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 14:53:16 +00:00
:credentials => credentials
}
tests('Test cached Compute credentials').returns(credentials) do
conn = Fog::Compute::HP::Real.new(options)
conn.credentials
end
end