Test plperl only on non standard installation as it does not work on redhat5

This commit is contained in:
Mickaël Canévet 2013-07-16 16:06:12 +02:00
parent f0ac7325f4
commit 5ff47cf1b8
2 changed files with 3 additions and 19 deletions

View file

@ -41,6 +41,7 @@ class postgresql::params(
$custom_contrib_package_name = undef,
$custom_devel_package_name = undef,
$custom_java_package_name = undef,
$custom_plperl_package_name = undef,
$custom_service_name = undef,
$custom_user = undef,
$custom_group = undef,
@ -114,14 +115,11 @@ class postgresql::params(
$contrib_package_name = pick($custom_contrib_package_name,'postgresql-contrib')
$devel_package_name = pick($custom_devel_package_name, 'postgresql-devel')
$java_package_name = pick($custom_java_package_name, 'postgresql-jdbc')
$plperl_package_name = pick($custom_plperl_package_name, 'postgresql-plperl')
$service_name = pick($custom_service_name, 'postgresql')
$bindir = pick($custom_bindir, '/usr/bin')
$datadir = pick($custom_datadir, '/var/lib/pgsql/data')
$confdir = pick($custom_confdir, $datadir)
$plperl_package_name = $::operatingsystemrelease ? {
/^5\./ => 'postgresql84-plperl',
default => 'postgresql-plperl',
}
} else {
$version_parts = split($version, '[.]')
$package_version = "${version_parts[0]}${version_parts[1]}"
@ -130,11 +128,11 @@ class postgresql::params(
$contrib_package_name = pick($custom_contrib_package_name,"postgresql${package_version}-contrib")
$devel_package_name = pick($custom_devel_package_name, "postgresql${package_version}-devel")
$java_package_name = pick($custom_java_package_name, "postgresql${package_version}-jdbc")
$plperl_package_name = pick($custom_plperl_package_name, "postgresql${package_version}-plperl")
$service_name = pick($custom_service_name, "postgresql-${version}")
$bindir = pick($custom_bindir, "/usr/pgsql-${version}/bin")
$datadir = pick($custom_datadir, "/var/lib/pgsql/${version}/data")
$confdir = pick($custom_confdir, $datadir)
$plperl_package_name = "postgresql${package_version}-plperl"
}
$service_status = undef

View file

@ -22,20 +22,6 @@ describe 'install:' do
end
end
it 'test postgresql::plperl' do
pp = <<-EOS
class { 'postgresql::plperl': }
EOS
puppet_apply(pp) do |r|
r.exit_code.should_not == 1
end
puppet_apply(pp) do |r|
r.exit_code.should be_zero
end
end
describe 'postgresql::db' do
it 'should idempotently create a db that we can connect to' do
begin