puppet-ceilometer/spec/classes/ceilometer_policy_spec.rb
Iury Gregory Melo Ferreira 6156cb49f2 Ceilometer $::os_service_default for db and log
Switch to $::os_service_default all params in logging and db.
Changes: logging.pp, db.pp and tests.

Related-bug: #1515273

Change-Id: I412104bf46c4b40fdbd366e3a8a9dc9de5abb5fd
2015-11-24 18:49:06 +00:00

42 lines
895 B
Ruby

require 'spec_helper'
describe 'ceilometer::policy' do
shared_examples_for 'ceilometer policies' do
let :params do
{
:policy_path => '/etc/ceilometer/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
@default_facts.merge({ :osfamily => 'Debian' })
end
it_configures 'ceilometer policies'
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({ :osfamily => 'RedHat' })
end
it_configures 'ceilometer policies'
end
end