
This change adds possibility to use the os_service_default fact for configuration options that default to '<SERVICE DEFAULT>'. this change is done by analogy with cinder commit 667e6c0850672dbbf99381eb92468f95e5591913 Change-Id: Ie5c8909bcc1c9a6a7a9ab1b59eec4637751ffd74
33 lines
1.0 KiB
Ruby
33 lines
1.0 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'glance::backend::file' do
|
|
let :facts do
|
|
@default_facts.merge({
|
|
:osfamily => 'Debian',
|
|
})
|
|
end
|
|
|
|
it 'configures glance-api.conf' do
|
|
is_expected.to contain_glance_api_config('glance_store/default_store').with_value('file')
|
|
is_expected.to contain_glance_api_config('glance_store/filesystem_store_datadir').with_value('/var/lib/glance/images/')
|
|
end
|
|
|
|
it 'configures glance-cache.conf' do
|
|
is_expected.to contain_glance_cache_config('glance_store/filesystem_store_datadir').with_value('/var/lib/glance/images/')
|
|
end
|
|
|
|
describe 'when overriding datadir' do
|
|
let :params do
|
|
{:filesystem_store_datadir => '/tmp/'}
|
|
end
|
|
|
|
it 'configures glance-api.conf' do
|
|
is_expected.to contain_glance_api_config('glance_store/filesystem_store_datadir').with_value('/tmp/')
|
|
end
|
|
|
|
it 'configures glance-cache.conf' do
|
|
is_expected.to contain_glance_cache_config('glance_store/filesystem_store_datadir').with_value('/tmp/')
|
|
end
|
|
end
|
|
end
|