Merge "Set proper cache backend for keystone.conf"

This commit is contained in:
Jenkins 2016-06-01 14:57:31 +00:00 committed by Gerrit Code Review
commit e15ac3fcf9
2 changed files with 10 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class openstack_tasks::keystone::keystone {
$memcache_server_port = hiera('memcache_server_port', '11211')
$memcache_pool_maxsize = '100'
$memcache_servers = suffix(hiera('memcached_addresses'), inline_template(':<%= @memcache_server_port %>'))
$cache_backend = 'keystone.cache.memcache_pool'
$cache_backend = pick($keystone_hash['cache_backend'], 'dogpile.cache.pylibmc')
$token_caching = false
$token_driver = 'keystone.token.persistence.backends.memcache_pool.Token'
$token_provider = hiera('token_provider')

View File

@ -40,6 +40,8 @@ describe manifest do
end
end
let(:cache_backend) { Noop.puppet_function 'pick', keystone_hash['cache_backend'], 'dogpile.cache.pylibmc' }
let(:configuration_override) do
Noop.hiera_structure 'configuration'
end
@ -208,7 +210,7 @@ describe manifest do
it 'should configure keystone with paramters' do
should contain_keystone_config('token/caching').with(:value => 'false')
should contain_keystone_config('cache/enabled').with(:value => 'true')
should contain_keystone_config('cache/backend').with(:value => 'keystone.cache.memcache_pool')
should contain_keystone_config('cache/backend').with(:value => cache_backend)
should contain_keystone_config('memcache/servers').with(:value => memcache_servers)
should contain_keystone_config('cache/memcache_servers').with(:value => memcache_servers)
should contain_keystone_config('cache/memcache_dead_retry').with(:value => '60')
@ -219,6 +221,12 @@ describe manifest do
should contain_keystone_config('memcache/socket_timeout').with(:value => '1')
end
it 'should install packages for cache backend' do
if cache_backend =~ /pylibmc/
should contain_package('python-pylibmc').with('ensure' => 'present')
end
end
it 'should configure revoke_driver for keystone' do
should contain_keystone_config('revoke/driver').with(:value => revoke_driver)
end