2013-02-25 19:51:59 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'swift::proxy::ceilometer' do
|
|
|
|
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'Debian'
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
let :pre_condition do
|
2013-10-29 22:56:31 -04:00
|
|
|
'class { "concat::setup": }
|
|
|
|
concat { "/etc/swift/proxy-server.conf": }
|
2013-02-25 19:51:59 +01:00
|
|
|
class { "swift":
|
|
|
|
swift_hash_suffix => "dummy"
|
|
|
|
}'
|
|
|
|
end
|
|
|
|
|
|
|
|
let :fragment_file do
|
|
|
|
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/33_swift_ceilometer"
|
|
|
|
end
|
|
|
|
|
2015-03-23 18:23:07 +01:00
|
|
|
it { is_expected.to contain_file(fragment_file).with_content(/[filter:ceilometer]/) }
|
|
|
|
it { is_expected.to contain_file(fragment_file).with_content(/use = egg:ceilometer#swift/) }
|
2015-05-20 18:09:58 -07:00
|
|
|
if Puppet.version.to_f < 4.0
|
|
|
|
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[::Ceilometer]')}
|
|
|
|
else
|
|
|
|
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[Ceilometer]')}
|
|
|
|
end
|
2015-03-23 18:23:07 +01:00
|
|
|
it { is_expected.to contain_user('swift').with_groups('ceilometer') }
|
|
|
|
it { is_expected.to contain_file('/var/log/ceilometer/swift-proxy-server.log').with(:owner => 'swift', :group => 'swift', :mode => '0664') }
|
2013-02-25 19:51:59 +01:00
|
|
|
|
|
|
|
end
|