diff --git a/manifests/server/tablespace.pp b/manifests/server/tablespace.pp index 26ff4d5..b8a9823 100644 --- a/manifests/server/tablespace.pp +++ b/manifests/server/tablespace.pp @@ -25,10 +25,13 @@ define postgresql::server::tablespace( $create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'" file { $location: - ensure => directory, - owner => $user, - group => $group, - mode => '0700', + ensure => directory, + owner => $user, + group => $group, + mode => '0700', + seluser => 'system_u', + selrole => 'object_r', + seltype => 'postgresql_db_t', } $create_ts = "Create tablespace '${spcname}'" diff --git a/spec/acceptance/server/schema_spec.rb b/spec/acceptance/server/schema_spec.rb index d70e04e..065ec63 100644 --- a/spec/acceptance/server/schema_spec.rb +++ b/spec/acceptance/server/schema_spec.rb @@ -1,11 +1,6 @@ require 'spec_helper_acceptance' describe 'postgresql::server::schema:', :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) - end - it 'should create a schema for a user' do begin pp = <<-EOS.unindent diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 61c8b23..8618c1f 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -96,11 +96,6 @@ RSpec.configure do |c| on host, '/usr/sbin/update-locale' end - - if fact('osfamily') == 'RedHat' - shell('yum -y install policycoreutils-python') - shell('semanage port -a -t postgresql_port_t -p tcp 5433') - end on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] } on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }