
This change updates the last few tests that don't leverage rspec-puppet-facts do use the on_supported_os method for testing. Change-Id: Ife1442cf0be103327af70560363ce58f1a29ac92
40 lines
922 B
Ruby
40 lines
922 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'vitrage::policy' do
|
|
|
|
shared_examples_for 'vitrage::policy' do
|
|
let :params do
|
|
{
|
|
:policy_path => '/etc/vitrage/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_vitrage_config('oslo_policy/policy_file').with_value('/etc/vitrage/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 'vitrage::policy'
|
|
end
|
|
end
|
|
|
|
end
|