
Change-Id: I07c22568ca6c6d1155626fff7cf1d3ca3c6fd5c5 Implements: blueprint add-puppet-mistral
42 lines
836 B
Ruby
42 lines
836 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'mistral::policy' do
|
|
|
|
shared_examples_for 'mistral policies' do
|
|
let :params do
|
|
{
|
|
:policy_path => '/etc/mistral/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'
|
|
})
|
|
end
|
|
end
|
|
|
|
context 'on Debian platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'Debian' }
|
|
end
|
|
|
|
it_configures 'mistral policies'
|
|
end
|
|
|
|
context 'on RedHat platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'RedHat' }
|
|
end
|
|
|
|
it_configures 'mistral policies'
|
|
end
|
|
end
|