diff --git a/spec/support/shared_examples/non_default_postgres.rb b/spec/support/shared_examples/non_default_postgres.rb index ef931fc..f7d070f 100644 --- a/spec/support/shared_examples/non_default_postgres.rb +++ b/spec/support/shared_examples/non_default_postgres.rb @@ -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 diff --git a/spec/support/shared_examples/system_default_postgres.rb b/spec/support/shared_examples/system_default_postgres.rb index a5845d4..7320269 100644 --- a/spec/support/shared_examples/system_default_postgres.rb +++ b/spec/support/shared_examples/system_default_postgres.rb @@ -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': diff --git a/spec/system/test_module/manifests/system_default/test_tablespace.pp b/spec/system/test_module/manifests/system_default/test_tablespace.pp index 5d67f8c..86e47ed 100644 --- a/spec/system/test_module/manifests/system_default/test_tablespace.pp +++ b/spec/system/test_module/manifests/system_default/test_tablespace.pp @@ -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':