2013-08-27 22:43:47 +02:00
|
|
|
require 'spec_helper_system'
|
|
|
|
|
2013-09-20 15:35:24 +02:00
|
|
|
describe 'postgresql::server::contrib:' do
|
2013-08-27 22:43:47 +02:00
|
|
|
after :all do
|
2013-09-14 07:33:46 +02:00
|
|
|
# Cleanup after tests have ran, remove both contrib and server as contrib
|
|
|
|
# pulls in the server based packages.
|
2013-09-18 23:25:51 +02:00
|
|
|
pp = <<-EOS.unindent
|
2013-09-14 07:33:46 +02:00
|
|
|
class { 'postgresql::server':
|
|
|
|
ensure => absent,
|
|
|
|
}
|
2013-09-20 15:35:24 +02:00
|
|
|
class { 'postgresql::server::contrib':
|
2013-09-14 07:33:46 +02:00
|
|
|
package_ensure => purged,
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
|
|
|
|
puppet_apply(pp) do |r|
|
2013-08-27 22:43:47 +02:00
|
|
|
r.exit_code.should_not == 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'test loading class with no parameters' do
|
2013-09-18 23:25:51 +02:00
|
|
|
pp = <<-EOS.unindent
|
2013-09-14 07:33:46 +02:00
|
|
|
class { 'postgresql::server': }
|
2013-09-20 15:35:24 +02:00
|
|
|
class { 'postgresql::server::contrib': }
|
2013-08-27 22:43:47 +02:00
|
|
|
EOS
|
|
|
|
|
|
|
|
puppet_apply(pp) do |r|
|
2013-09-18 23:25:51 +02:00
|
|
|
r.exit_code.should == 2
|
2013-08-27 22:43:47 +02:00
|
|
|
r.refresh
|
|
|
|
r.exit_code.should == 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|