diff --git a/files/validate_postgresql_connection.sh b/files/validate_postgresql_connection.sh deleted file mode 100644 index 1c3506c71a..0000000000 --- a/files/validate_postgresql_connection.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# usage is: validate_db_connection 2 50 psql - -SLEEP=$1 -TRIES=$2 -PSQL=$3 - -STATE=1 - -c=1 - -while [ $c -le $TRIES ] -do - echo $c - if [ $c -gt 1 ] - then - echo 'sleeping' - sleep $SLEEP - fi - - /bin/echo "SELECT 1" | $PSQL - STATE=$? - - if [ $STATE -eq 0 ] - then - exit 0 - fi - c=$((c+1)) -done - -echo 'Unable to connect to postgresql' - -exit 1 diff --git a/manifests/client.pp b/manifests/client.pp index 7aa952fddf..39dd76d726 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -6,7 +6,7 @@ # @param file_ensure # Ensure the connection validation script is present # @param validcon_script_path -# Optional. Absolute path for the postgresql connection validation script. +# Deprecated: absolute path for the postgresql connection validation script that is now ensured absent. # @param package_name # Sets the name of the PostgreSQL client package. # @param package_ensure @@ -26,10 +26,6 @@ } file { $validcon_script_path: - ensure => $file_ensure, - content => file('postgresql/validate_postgresql_connection.sh'), - owner => 0, - group => 0, - mode => '0755', + ensure => absent, } } diff --git a/manifests/globals.pp b/manifests/globals.pp index 64a4815fcc..7ce32fa4fa 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -23,7 +23,7 @@ # @param service_status Overrides the default status check command for your PostgreSQL service. # @param default_database Specifies the name of the default database to connect with. # -# @param validcon_script_path Scipt path for the connection validation check. +# @param validcon_script_path Deprecated parameter for the scipt path for the connection validation check. This file will be ensured absent # # @param initdb_path Path to the initdb command. # @param psql_path Sets the path to the psql command. diff --git a/spec/classes/client_spec.rb b/spec/classes/client_spec.rb index 55fee3ed54..e8b43e038b 100644 --- a/spec/classes/client_spec.rb +++ b/spec/classes/client_spec.rb @@ -22,10 +22,7 @@ end it 'has specified validate connexion' do - expect(subject).to contain_file('/opt/bin/my-validate-con.sh').with(ensure: 'file', - owner: 0, - group: 0, - mode: '0755') + expect(subject).to contain_file('/opt/bin/my-validate-con.sh').with(ensure: 'absent') end end