Commit 9d6c1f1b authored by Steven Murray's avatar Steven Murray
Browse files

Upgraded PostgreSQL server to version 12

parent f51aaa4d
......@@ -137,7 +137,7 @@ dbunittests_postgresql:
- createrepo ${CTAREPODIR}; echo -e "[cta-artifacts]\nname=CTA artifacts\nbaseurl=file://${CTAREPODIR}\ngpgcheck=0\nenabled=1\npriority=2" > /etc/yum.repos.d/cta-artifacts.repo
- yum -y --nogpgcheck install cta-systemtests cta-debuginfo sqlite-debuginfo --enablerepo=debug
- yum -y install cta-catalogueutils
- yum -y install rh-postgresql96-postgresql-server
- yum -y install rh-postgresql12-postgresql-server
- POSTGRESQL_DATA_DIR=/usr/local/cta_test_pgsql_data
- POSTGRESQL_LOG_DIR=/var/log/postgres
- echo POSTGRESQL_DATA_DIR=${POSTGRESQL_DATA_DIR}
......@@ -146,8 +146,8 @@ dbunittests_postgresql:
- chown -R postgres:postgres ${POSTGRESQL_DATA_DIR}
- mkdir -p ${POSTGRESQL_LOG_DIR}
- chown -R postgres:postgres ${POSTGRESQL_LOG_DIR}
- export LD_LIBRARY_PATH=/opt/rh/rh-postgresql96/root/usr/lib64
- POSTGRES_BIN=/opt/rh/rh-postgresql96/root/usr/bin
- export LD_LIBRARY_PATH=/opt/rh/rh-postgresql12/root/usr/lib64
- POSTGRES_BIN=/opt/rh/rh-postgresql12/root/usr/bin
- echo POSTGRES_BIN=${POSTGRES_BIN}
- runuser -u postgres -- ${POSTGRES_BIN}/initdb -D ${POSTGRESQL_DATA_DIR}
- runuser -u postgres -- ${POSTGRES_BIN}/pg_ctl start -w -t 10 -D ${POSTGRESQL_DATA_DIR} -l ${POSTGRESQL_LOG_DIR}/cta_test_postgres.log
......
......@@ -2,8 +2,8 @@
# Utility script to run postgresql tests like in CI.
if ! rpm -q --quiet rh-postgresql96-postgresql-server; then
echo "Please install the package rh-postgresql96-postgresql-server to run this script."
if ! rpm -q --quiet rh-postgresql12-postgresql-server; then
echo "Please install the package rh-postgresql12-postgresql-server to run this script."
exit 1
fi
......@@ -25,8 +25,8 @@ mkdir -p ${POSTGRESQL_DATA_DIR}
chown -R postgres:postgres ${POSTGRESQL_DATA_DIR}
mkdir -p ${POSTGRESQL_LOG_DIR}
chown -R postgres:postgres ${POSTGRESQL_LOG_DIR}
export LD_LIBRARY_PATH=/opt/rh/rh-postgresql96/root/usr/lib64
POSTGRES_BIN=/opt/rh/rh-postgresql96/root/usr/bin
export LD_LIBRARY_PATH=/opt/rh/rh-postgresql12/root/usr/lib64
POSTGRES_BIN=/opt/rh/rh-postgresql12/root/usr/bin
echo POSTGRES_BIN=${POSTGRES_BIN}
(cd / ;
runuser -u postgres -- ${POSTGRES_BIN}/initdb -D ${POSTGRESQL_DATA_DIR}
......@@ -40,4 +40,4 @@ echo 'postgresql:postgresql://cta@localhost/cta' > ${CTA_CATALOGUE_CONF}
./catalogue/cta-catalogue-schema-create ${CTA_CATALOGUE_CONF}
./tests/cta-rdbmsUnitTests ${CTA_CATALOGUE_CONF}
(cd / ; runuser -u postgres -- ${POSTGRES_BIN}/pg_ctl stop -D ${POSTGRESQL_DATA_DIR})
rm -rf ${POSTGRESQL_DATA_DIR}
\ No newline at end of file
rm -rf ${POSTGRESQL_DATA_DIR}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment