Added puppetlabs-firewall (required by puppetlabs-postgresql), updated the other modules.
This commit is contained in:
parent
5f4b7a3b72
commit
dee66abcdd
137 changed files with 11118 additions and 419 deletions
|
@ -32,12 +32,22 @@ describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS
|
|||
apply_manifest(pp, :catch_failures => true)
|
||||
end
|
||||
|
||||
it 'stops postgresql' do
|
||||
# First we stop postgresql.
|
||||
pp = <<-EOS
|
||||
class { 'postgresql::server':
|
||||
service_ensure => 'stopped',
|
||||
}
|
||||
EOS
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
end
|
||||
|
||||
it 'should keep retrying if database is down' do
|
||||
# So first we shut the db down, then background a startup routine with a
|
||||
# sleep 10 in front of it. That way the tests should continue while
|
||||
# the pause and db startup happens in the background.
|
||||
shell("/etc/init.d/postgresql* stop")
|
||||
shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &')
|
||||
if fact('operatingsystem') == 'RedHat' && fact('operatingsystemrelease') =~ /^7/
|
||||
shell('nohup bash -c "sleep 10; systemctl start `basename /usr/lib/systemd/system/postgres*`" > /dev/null 2>&1 &')
|
||||
else
|
||||
shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &')
|
||||
end
|
||||
|
||||
pp = <<-EOS.unindent
|
||||
postgresql::validate_db_connection { 'foo':
|
||||
|
@ -47,7 +57,6 @@ describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS
|
|||
run_as => 'postgres',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
end
|
||||
|
||||
|
@ -76,4 +85,13 @@ describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS
|
|||
|
||||
apply_manifest(pp, :expect_failures => true)
|
||||
end
|
||||
|
||||
it 'starts postgresql' do
|
||||
pp = <<-EOS
|
||||
class { 'postgresql::server':
|
||||
service_ensure => 'running',
|
||||
}
|
||||
EOS
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue