Merge "Fix broken rendering of OIDC Options"

This commit is contained in:
Zuul 2024-03-08 15:03:26 +00:00 committed by Gerrit Code Review
commit fc0d8d4afb
2 changed files with 41 additions and 5 deletions

View File

@ -125,6 +125,42 @@ describe 'keystone::federation::openidc' do
end
context 'with memcache options' do
before do
params.merge!({
:openidc_cache_type => 'memcache',
:openidc_cache_shm_max => 10,
:openidc_cache_shm_entry_size => 11,
:openidc_cache_dir => '/var/cache/openidc',
:openidc_cache_clean_interval => 12,
})
end
it 'should contain memcache servers' do
content = get_param('concat::fragment', 'configure_openidc_keystone', 'content')
expect(content).to match('OIDCCacheType memcache')
expect(content).to match('OIDCCacheShmMax 10')
expect(content).to match('OIDCCacheShmEntrySize 11')
expect(content).to match('OIDCCacheDir /var/cache/openidc')
expect(content).to match('OIDCCacheFileCleanInterval 12')
end
end
context 'with redis options' do
before do
params.merge!({
:openidc_cache_type => 'redis',
:redis_password => 'redispass',
})
end
it 'should contain memcache servers' do
content = get_param('concat::fragment', 'configure_openidc_keystone', 'content')
expect(content).to match('OIDCCacheType redis')
expect(content).to match('OIDCRedisCachePassword "redispass"')
end
end
context 'with memcached_servers attribute' do
before do
params.merge!({

View File

@ -13,16 +13,16 @@
OIDCCacheType <%= scope['::keystone::federation::openidc::openidc_cache_type'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::openidc_cache_shm_max'] != nil -%>
OIDCCacheShmMax scope['::keystone::federation::openidc::openidc_cache_shm_max'] %>
OIDCCacheShmMax <%= scope['::keystone::federation::openidc::openidc_cache_shm_max'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::openidc_cache_shm_entry_size'] != nil -%>
OIDCCacheShmEntrySize scope['::keystone::federation::openidc::openidc_cache_shm_entry_size'] %>
OIDCCacheShmEntrySize <%= scope['::keystone::federation::openidc::openidc_cache_shm_entry_size'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::openidc_cache_dir'] != nil -%>
OIDCCacheDir scope['::keystone::federation::openidc::openidc_cache_dir'] %>
OIDCCacheDir <%= scope['::keystone::federation::openidc::openidc_cache_dir'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::openidc_cache_clean_interval'] != nil -%>
OIDCCacheFileCleanInterval scope['::keystone::federation::openidc::openidc_cache_clean_interval'] %>
OIDCCacheFileCleanInterval <%= scope['::keystone::federation::openidc::openidc_cache_clean_interval'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::memcached_servers_real'] != nil -%>
OIDCMemCacheServers "<%= scope['::keystone::federation::openidc::memcached_servers_real'] %>"
@ -31,7 +31,7 @@
OIDCRedisCacheServer "<%= scope['::keystone::federation::openidc::redis_server'] %>"
<%- end -%>
<%- if scope['::keystone::federation::openidc::redis_password'] != nil -%>
OIDCRedisCachecPassword scope['::keystone::federation::openidc::redis_password'] %>
OIDCRedisCachePassword "<%= scope['::keystone::federation::openidc::redis_password'] %>"
<%- end -%>
<%- if scope['::keystone::federation::openidc::openidc_claim_delimiter'] != nil -%>
OIDCClaimDelimiter "<%= scope['::keystone::federation::openidc::openidc_claim_delimiter'] %>"