You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
require 'spec_helper' |
|
|
|
describe 'barbican::policy' do |
|
|
|
shared_examples_for 'barbican policies' do |
|
let :params do |
|
{ |
|
:policy_path => '/etc/barbican/policy.yaml', |
|
:policies => { |
|
'context_is_admin' => { |
|
'key' => 'context_is_admin', |
|
'value' => 'foo:bar' |
|
} |
|
} |
|
} |
|
end |
|
|
|
it 'set up the policies' do |
|
is_expected.to contain_openstacklib__policy__base('context_is_admin').with({ |
|
:key => 'context_is_admin', |
|
:value => 'foo:bar', |
|
:file_user => 'root', |
|
:file_group => 'barbican', |
|
:file_format => 'yaml', |
|
}) |
|
is_expected.to contain_oslo__policy('barbican_config').with( |
|
:policy_file => '/etc/barbican/policy.yaml', |
|
) |
|
end |
|
end |
|
|
|
on_supported_os({ |
|
:supported_os => OSDefaults.get_supported_os |
|
}).each do |os,facts| |
|
context "on #{os}" do |
|
let (:facts) do |
|
facts.merge!(OSDefaults.get_facts()) |
|
end |
|
|
|
it_configures 'barbican policies' |
|
end |
|
end |
|
end
|
|
|