Merge "Configure glance-cache.conf with file backend"

This commit is contained in:
Jenkins 2013-07-06 21:55:24 +00:00 committed by Gerrit Code Review
commit 3a0003f9bb
2 changed files with 21 additions and 7 deletions

View File

@ -9,8 +9,11 @@ class glance::backend::file(
) inherits glance::api {
glance_api_config {
'DEFAULT/default_store': value => 'file';
'DEFAULT/default_store': value => 'file';
'DEFAULT/filesystem_store_datadir': value => $filesystem_store_datadir;
}
glance_cache_config {
'DEFAULT/filesystem_store_datadir': value => $filesystem_store_datadir;
}
}

View File

@ -2,22 +2,33 @@ require 'spec_helper'
describe 'glance::backend::file' do
let :facts do
{
:osfamily => 'Debian'
}
{ :osfamily => 'Debian' }
end
let :pre_condition do
'class { "glance::api": keystone_password => "pass" }'
end
it { should contain_glance_api_config('DEFAULT/default_store').with_value('file') }
it { should contain_glance_api_config('DEFAULT/filesystem_store_datadir').with_value('/var/lib/glance/images/') }
it 'configures glance-api.conf' do
should contain_glance_api_config('DEFAULT/default_store').with_value('file')
should contain_glance_api_config('DEFAULT/filesystem_store_datadir').with_value('/var/lib/glance/images/')
end
it 'configures glance-cache.conf' do
should contain_glance_cache_config('DEFAULT/filesystem_store_datadir').with_value('/var/lib/glance/images/')
end
describe 'when overriding datadir' do
let :params do
{:filesystem_store_datadir => '/tmp/'}
end
it { should contain_glance_api_config('DEFAULT/filesystem_store_datadir').with_value('/tmp/') }
it 'configures glance-api.conf' do
should contain_glance_api_config('DEFAULT/filesystem_store_datadir').with_value('/tmp/')
end
it 'configures glance-cache.conf' do
should contain_glance_cache_config('DEFAULT/filesystem_store_datadir').with_value('/tmp/')
end
end
end