Project

General

Profile

« Previous | Next » 

Revision 359a604f

Added by Ivan Necas about 10 years ago

Update puppet modules

View differences:

modules/postgresql/spec/acceptance/server/tablespace_spec.rb
require 'spec_helper_acceptance'
describe 'postgresql::server::tablespace:' do
describe 'postgresql::server::tablespace:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
after :all do
# Cleanup after tests have ran
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
......
pp = <<-EOS.unindent
class { 'postgresql::server': }
file { '/tmp/pg_tablespaces':
file { '/tmp/postgres/pg_tablespaces':
ensure => 'directory',
owner => 'postgres',
group => 'postgres',
......
}
postgresql::server::tablespace { 'tablespace1':
location => '/tmp/pg_tablespaces/space1',
location => '/tmp/postgres/pg_tablespaces/space1',
}
postgresql::server::database { 'tablespacedb1':
encoding => 'utf8',
......
password_hash => postgresql_password('spcuser', 'spcuser'),
}
postgresql::server::tablespace { 'tablespace2':
location => '/tmp/pg_tablespaces/space2',
location => '/tmp/postgres/pg_tablespaces/space2',
owner => 'spcuser',
}
postgresql::server::database { 'tablespacedb3':
......
}
EOS
shell('mkdir -p /tmp/postgres')
# Apply appropriate selinux labels
if fact('osfamily') == 'RedHat'
if shell('getenforce').stdout =~ /Enforcing/
shell('chcon -Rv --type=postgresql_db_t /tmp/postgres')
end
end
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)

Also available in: Unified diff