Fix idempotency tests

Signed-off-by: Ken Barber <ken@bob.sh>
This commit is contained in:
Ken Barber 2013-10-22 13:22:05 +01:00
parent cce5324642
commit 683bda3e3e

View file

@ -4,16 +4,16 @@ describe 'basic tests:' do
it 'make sure we have copied the module across' do
# No point diagnosing any more if the module wasn't copied properly
shell("ls /etc/puppet/modules/puppetdb") do |r|
r[:exit_code].should == 0
r[:stdout].should =~ /Modulefile/
r[:stderr].should == ''
r.exit_code.should == 0
r.stdout.should =~ /Modulefile/
r.stderr.should == ''
end
end
it 'make sure a puppet agent has ran' do
puppet_agent do |r|
r[:stderr].should == ''
r[:exit_code].should == 0
r.stderr.should == ''
r.exit_code.should == 0
end
end
@ -32,13 +32,9 @@ class { 'puppetdb::master::config': }
shell('puppet module install puppetlabs/inifile --version "1.x"')
puppet_apply(pp) do |r|
r[:exit_code].should_not eq(1)
end
end
it 'should be idempotent' do
puppet_apply(:code => pp, :debug => true) do |r|
r[:exit_code].should == 0
r.exit_code.should_not eq(1)
r.refresh
r.exit_code.should == 0
end
end
end
@ -55,7 +51,9 @@ class { 'puppetdb::master::config':
it 'should add the puppetdb report processor to puppet.conf' do
puppet_apply(pp) do |r|
r[:exit_code].should_not eq(1)
r.exit_code.should_not eq(1)
r.refresh
r.exit_code.should == 0
end
shell("cat /etc/puppet/puppet.conf") do |r|