(GH-130) Amend system tests for Centos 5

Skip tests that don't apply to Centos 5, and make sure the parent directory
for tablespace correction has the correct SELinux settings for tablespace
management.

Signed-off-by: Ken Barber <ken@bob.sh>
This commit is contained in:
Ken Barber 2013-02-21 21:23:56 +00:00
parent 4d70c188e8
commit 0a76406e23
3 changed files with 13 additions and 8 deletions

View file

@ -41,6 +41,7 @@ shared_examples :non_default_postgres do
it 'with locale and charset, the postgres database should reflect that locale' do
pending('no support for initdb with lucid', :if => vm == :lucid)
pending('no support for locale parameter with centos 5', :if => vm == :centos5)
manifest = <<-EOS
# Set global locale and charset option, and try installing postgres

View file

@ -51,6 +51,7 @@ shared_examples :system_default_postgres do
end
it 'should take a locale parameter' do
pending('no support for locale parameter with centos 5', :if => vm == :centos5)
manifest = <<-EOS
include postgresql::server
postgresql::db { 'test1':

View file

@ -20,15 +20,18 @@ class postgresql_tests::system_default::test_tablespace {
include postgresql::server
file { '/tmp':
ensure => 'directory',
}
file { '/tmp/pg_tablespaces':
ensure => 'directory',
owner => 'postgres',
group => 'postgres',
mode => '0700',
require => File['/tmp'],
ensure => 'directory',
owner => 'postgres',
group => 'postgres',
mode => '0700',
}~>
# This works around rubies that lack Selinux support, I'm looking at you RHEL5
exec { "chcon system_u:object_r:postgresql_db_t /tmp/pg_tablespaces":
refreshonly => true,
path => "/bin:/usr/bin",
onlyif => "which chcon",
before => File["/tmp/pg_tablespaces/space1", "/tmp/pg_tablespaces/space2"]
}
postgresql::tablespace{ 'tablespace1':