From 5ff47cf1b8b4942e5b74696541f7d9d2b6b2ddd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Tue, 16 Jul 2013 16:06:12 +0200 Subject: [PATCH] Test plperl only on non standard installation as it does not work on redhat5 --- manifests/params.pp | 8 +++----- spec/system/install_spec.rb | 14 -------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 8c70978..12d5f1f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 diff --git a/spec/system/install_spec.rb b/spec/system/install_spec.rb index f18f3da..e3eab84 100644 --- a/spec/system/install_spec.rb +++ b/spec/system/install_spec.rb @@ -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