module-postgresql/spec/system/client_spec.rb
Ken Barber 27c5cc0304 Provide package removal fixes for Debian tests
This patch provides fixes to help tests pass on Debian. The failures were in
relation to the lack of proper removal of the server and contrib parts. Setting
the ensure => purged parameter for removal seems to have solved a lot of this.

Also, the ordering for contrib being (un)installed needed some work.

I've also made sure we use 'purged' a lot more in tests to make sure we clean
up after ourselves properly.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00

22 lines
485 B
Ruby

require 'spec_helper_system'
describe 'postgresql::client:' do
after :all do
# Cleanup after tests have ran
puppet_apply("class { 'postgresql::client': package_ensure => purged }") do |r|
r.exit_code.should_not == 1
end
end
it 'test loading class with no parameters' do
pp = <<-EOS
class { 'postgresql::client': }
EOS
puppet_apply(pp) do |r|
r.exit_code.should_not == 1
r.refresh
r.exit_code.should == 0
end
end
end