Fix spec tests for RSpec 3.x and Puppet 4.x

Remove value testing (we only check the key here), the value is nil or undef
and fix resource array, according[1].

[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

Change-Id: Ic7a9b9d1e6d6b6b1c40fbce40d0bf9ff913f191e
Closes-bug: #1447620
This commit is contained in:
Sebastien Badia
2015-05-20 18:09:58 -07:00
parent 5e814f1b5f
commit 4a6e4cbb33
7 changed files with 23 additions and 17 deletions

View File

@@ -22,7 +22,11 @@ describe 'swift::proxy::ceilometer' do
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/) }
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[::Ceilometer]') }
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
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') }