Skip to content

Commit

Permalink
(PA-5981) Update smoke test to install postgresql-14
Browse files Browse the repository at this point in the history
  • Loading branch information
tvpartytonight committed Jan 18, 2024
1 parent cb652ae commit 6d83dc3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ext/smoke/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ function install_puppetdb_from_package() {
echo "STEP: Set-up postgresql 11 to use with PuppetDB"
on_master ${master_vm} "yum install -y ca-certificates"
on_master ${master_vm} "${yum_cmd} install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
on_master ${master_vm} "rpm --query --quiet postgresql11-server || ${yum_cmd} install -y postgresql11-server"
on_master ${master_vm} "rpm --query --quiet postgresql11-contrib || ${yum_cmd} install -y postgresql11-contrib"
on_master ${master_vm} "puppet resource service postgresql-11 ensure=stopped"
on_master ${master_vm} "rm -rf /var/lib/pgsql/11/data && /usr/pgsql-11/bin/postgresql-11-setup initdb"
on_master ${master_vm} "puppet resource service postgresql-11 ensure=running enable=true"
on_master ${master_vm} "rpm --query --quiet postgresql14-server || ${yum_cmd} install -y postgresql14-server"
on_master ${master_vm} "rpm --query --quiet postgresql14-contrib || ${yum_cmd} install -y postgresql14-contrib"
on_master ${master_vm} "puppet resource service postgresql-14 ensure=stopped"
on_master ${master_vm} "rm -rf /var/lib/pgsql/11/data && /usr/pgsql-14/bin/postgresql-14-setup initdb"
on_master ${master_vm} "puppet resource service postgresql-14 ensure=running enable=true"

#After postgress has been installed we need to remove the postgress repo or else other yum install commands will fail.
on_master ${master_vm} "${yum_cmd} remove -y pgdg-redhat-repo-42.0-24.noarch"
Expand All @@ -192,7 +192,7 @@ function install_puppetdb_from_package() {

# Restart postgresql and ensure that the puppetdb user can authenticate
# (you will need to enter the password then hit exit)
on_master ${master_vm} 'service postgresql-11 restart'
on_master ${master_vm} 'service postgresql-14 restart'
# Should list puppetdb as one of the users
on_master ${master_vm} "echo puppet | psql -h localhost puppetdb puppetdb -c '\\du' | grep puppetdb"
echo ""
Expand Down

0 comments on commit 6d83dc3

Please sign in to comment.