067b75baf2
Change-Id: I7a03dc9ec586dea530d6d17f8cda0237d7a2cc8d
40 lines
930 B
Ruby
40 lines
930 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'keystone::policy' do
|
|
|
|
shared_examples_for 'keystone policies' do
|
|
let :params do
|
|
{
|
|
:policy_path => '/etc/keystone/policy.json',
|
|
: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'
|
|
})
|
|
is_expected.to contain_keystone_config('oslo_policy/policy_file').with_value('/etc/keystone/policy.json')
|
|
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 'keystone policies'
|
|
end
|
|
end
|
|
|
|
end
|