
This change updates the test that currently do Debian/RedHat sets of tests to use on_supported_os from rspec-puppet-facts. This improves the over all coverage with the specific CentOS, Debian, RedHat and Ubuntu flavors of facts. Change-Id: Ic7b12cd8972bbde0574806acb2d680f14f1c267f
39 lines
831 B
Ruby
39 lines
831 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::policy' do
|
|
|
|
shared_examples_for 'cinder policies' do
|
|
let :params do
|
|
{
|
|
:policy_path => '/etc/cinder/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
|
|
|
|
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({:processorcount => 8}))
|
|
end
|
|
|
|
it_configures 'cinder policies'
|
|
end
|
|
end
|
|
|
|
end
|