2012-03-31 16:09:29 -07:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'glance::backend::swift' do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'Debian'
|
|
|
|
}
|
|
|
|
end
|
2012-10-14 00:23:20 -07:00
|
|
|
|
2012-03-31 16:09:29 -07:00
|
|
|
let :params do
|
|
|
|
{
|
2012-10-14 00:23:20 -07:00
|
|
|
:swift_store_user => 'user',
|
|
|
|
:swift_store_key => 'key',
|
2012-03-31 16:09:29 -07:00
|
|
|
}
|
|
|
|
end
|
2012-10-14 00:23:20 -07:00
|
|
|
|
2012-10-14 12:36:13 -07:00
|
|
|
let :pre_condition do
|
|
|
|
'class { "glance::api": keystone_password => "pass" }'
|
|
|
|
end
|
|
|
|
|
2012-10-14 00:23:20 -07:00
|
|
|
it { should contain_glance_api_config('DEFAULT/default_store').with_value('swift') }
|
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_key').with_value('key') }
|
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_user').with_value('user') }
|
2013-04-04 18:23:05 -04:00
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('2') }
|
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.1:5000/v2.0/') }
|
2012-10-14 00:23:20 -07:00
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('glance') }
|
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('False') }
|
|
|
|
|
|
|
|
describe 'when overriding datadir' do
|
2012-03-31 16:09:29 -07:00
|
|
|
let :params do
|
|
|
|
{
|
2012-10-14 00:23:20 -07:00
|
|
|
:swift_store_user => 'user',
|
|
|
|
:swift_store_key => 'key',
|
2013-04-04 18:23:05 -04:00
|
|
|
:swift_store_auth_version => '1',
|
2012-10-14 00:23:20 -07:00
|
|
|
:swift_store_auth_address => '127.0.0.2:8080/v1.0/',
|
|
|
|
:swift_store_container => 'swift',
|
|
|
|
:swift_store_create_container_on_put => 'True'
|
2012-03-31 16:09:29 -07:00
|
|
|
}
|
|
|
|
end
|
2012-10-14 00:23:20 -07:00
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('swift') }
|
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('True') }
|
2013-04-04 18:23:05 -04:00
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('1') }
|
2012-10-14 00:23:20 -07:00
|
|
|
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.2:8080/v1.0/') }
|
2012-03-31 16:09:29 -07:00
|
|
|
end
|
|
|
|
end
|