- it { should contain_keystone_config('catalog/driver').with_value(params[:catalog_driver]) }
- end
-
- describe 'when configuring deprecated token_format as UUID with enable_pki_setup' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_format' => 'UUID'
- }
- end
- it { should contain_exec('keystone-manage pki_setup').with(
- :creates => '/etc/keystone/ssl/private/signing_key.pem'
- ) }
- it { should contain_file('/var/cache/keystone').with_ensure('directory') }
- describe 'when overriding the cache dir' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_provider' => 'keystone.token.providers.pki.Provider',
- 'cache_dir' => '/var/lib/cache/keystone'
- }
- end
- it { should contain_file('/var/lib/cache/keystone') }
- end
- end
-
- describe 'when configuring deprecated token_format as UUID without enable_pki_setup' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_format' => 'UUID',
- 'enable_pki_setup' => false
- }
- end
- it { should_not contain_exec('keystone-manage pki_setup') }
- it { should contain_file('/var/cache/keystone').with_ensure('directory') }
- describe 'when overriding the cache dir' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_provider' => 'keystone.token.providers.uuid.Provider',
- 'cache_dir' => '/var/lib/cache/keystone'
- }
- end
- it { should contain_file('/var/lib/cache/keystone') }
- end
- end
-
- describe 'when configuring deprecated token_format as PKI with enable_pki_setup' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_format' => 'PKI',
- }
- end
- it { should contain_exec('keystone-manage pki_setup').with(
- :creates => '/etc/keystone/ssl/private/signing_key.pem'
- ) }
- it { should contain_file('/var/cache/keystone').with_ensure('directory') }
- describe 'when overriding the cache dir' do
- let :params do
- {
- 'admin_token' => 'service_token',
- 'token_provider' => 'keystone.token.providers.pki.Provider',
- 'cache_dir' => '/var/lib/cache/keystone'
- }
- end
- it { should contain_file('/var/lib/cache/keystone') }
- end