3 describe 'glance::backend::swift' do
12 :swift_store_user => 'user',
13 :swift_store_key => 'key',
18 'class { "glance::api": keystone_password => "pass" }'
21 describe 'when default parameters' do
23 it 'configures glance-api.conf' do
24 should contain_glance_api_config('glance_store/default_store').with_value('swift')
25 should contain_glance_api_config('glance_store/swift_store_key').with_value('key')
26 should contain_glance_api_config('glance_store/swift_store_user').with_value('user')
27 should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('2')
28 should contain_glance_api_config('DEFAULT/swift_store_large_object_size').with_value('5120')
29 should contain_glance_api_config('glance_store/swift_store_auth_address').with_value('127.0.0.1:5000/v2.0/')
30 should contain_glance_api_config('DEFAULT/swift_store_container').with_value('glance')
31 should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value(false)
34 it 'configures glance-cache.conf' do
35 should contain_glance_cache_config('glance_store/swift_store_key').with_value('key')
36 should contain_glance_cache_config('glance_store/swift_store_user').with_value('user')
37 should contain_glance_cache_config('DEFAULT/swift_store_auth_version').with_value('2')
38 should contain_glance_cache_config('DEFAULT/swift_store_large_object_size').with_value('5120')
39 should contain_glance_cache_config('glance_store/swift_store_auth_address').with_value('127.0.0.1:5000/v2.0/')
40 should contain_glance_cache_config('DEFAULT/swift_store_container').with_value('glance')
41 should contain_glance_cache_config('DEFAULT/swift_store_create_container_on_put').with_value(false)
45 describe 'when overriding parameters' do
48 :swift_store_user => 'user',
49 :swift_store_key => 'key',
50 :swift_store_auth_version => '1',
51 :swift_store_large_object_size => '100',
52 :swift_store_auth_address => '127.0.0.2:8080/v1.0/',
53 :swift_store_container => 'swift',
54 :swift_store_create_container_on_put => true
58 it 'configures glance-api.conf' do
59 should contain_glance_api_config('DEFAULT/swift_store_container').with_value('swift')
60 should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value(true)
61 should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('1')
62 should contain_glance_api_config('DEFAULT/swift_store_large_object_size').with_value('100')
63 should contain_glance_api_config('glance_store/swift_store_auth_address').with_value('127.0.0.2:8080/v1.0/')
66 it 'configures glance-cache.conf' do
67 should contain_glance_cache_config('DEFAULT/swift_store_container').with_value('swift')
68 should contain_glance_cache_config('DEFAULT/swift_store_create_container_on_put').with_value(true)
69 should contain_glance_cache_config('DEFAULT/swift_store_auth_version').with_value('1')
70 should contain_glance_cache_config('DEFAULT/swift_store_large_object_size').with_value('100')
71 should contain_glance_cache_config('glance_store/swift_store_auth_address').with_value('127.0.0.2:8080/v1.0/')