Merge "Fix the purge_config option for api and registry"

This commit is contained in:
Jenkins 2016-04-13 10:59:58 +00:00 committed by Gerrit Code Review
commit 63cbebc02e
4 changed files with 19 additions and 0 deletions

View File

@ -418,6 +418,10 @@ class glance::api(
}
}
resources { 'glance_api_config':
purge => $purge_config,
}
glance_cache_config {
'DEFAULT/image_cache_stall_time': value => $image_cache_stall_time;
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;

View File

@ -206,6 +206,10 @@ class glance::registry(
Glance_registry_config<||> ~> Service['glance-registry']
resources { 'glance_registry_config':
purge => $purge_config
}
glance_registry_config {
'DEFAULT/workers': value => $workers;
'DEFAULT/bind_host': value => $bind_host;

View File

@ -154,6 +154,12 @@ describe 'glance::api' do
is_expected.to contain_glance_api_config('DEFAULT/registry_client_key_file').with_value('<SERVICE DEFAULT>')
end
it 'passes purge to resource' do
is_expected.to contain_resources('glance_api_config').with({
:purge => false
})
end
it 'is_expected.to configure itself for keystone if that is the auth_type' do
if params[:auth_type] == 'keystone'
is_expected.to contain('paste_deploy/flavor').with_value('keystone+cachemanagement')

View File

@ -79,6 +79,11 @@ describe 'glance::registry' do
is_expected.not_to contain_exec('glance-manage db_sync')
end
end
it 'passes purge to resource' do
is_expected.to contain_resources('glance_registry_config').with({
:purge => false
})
end
it 'is_expected.to configure itself' do
[
'workers',