diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-10-08 16:15:18 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-10-08 16:15:18 +0300 |
commit | 87f559695267d114bde01b5dc8f2be4425aade41 (patch) | |
tree | dfacbdf6bed216ece6ee134ab6e4508aad4133dc /include/tests_databases | |
parent | f188bac7e8b92a4d1d933e5ed961c0417d4e1aeb (diff) |
Added new test DBS-1828
Diffstat (limited to 'include/tests_databases')
-rw-r--r-- | include/tests_databases | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/tests_databases b/include/tests_databases index 3ece8a99..16ea6786 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -180,6 +180,31 @@ # ################################################################################# # + # Test : DBS-1828 + # Description : Test PostgreSQL configuration file(s) + # + # Authentication: + # /var/lib/pgsql/data/pg_hba.conf + # + # Configuration + # Arch /var/lib/postgres/data/postgresql.conf + # CentOS/Fedora /var/lib/pgsql/data/postgresql.conf + # Ubuntu /etc/postgresql/x.y/main/postgresql.conf + + if [ "${POSTGRESQL_RUNNING}" -eq 1 ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="PostgreSQL not installed or not running"; fi + + Register --test-no DBS-1828 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Test PostgreSQL configuration" + if [ ${SKIPTEST} -eq 0 ]; then + FIND_PATHS="${ROOTDIR}etc/postgres ${ROOTDIR}var/lib/postgres/data" + CONFIG_FILES=$(${FINDBINARY} ${FIND_PATHS} -type f -name "postgresql.conf" -print0 2> /dev/null | ${TRBINARY} -cd '[:print:]\0' | ${TRBINARY} -d '\n' | ${TRBINARY} '\0' '\n' | xargs -i sh -c 'test -r "{}" && echo "{}" | ${SEDBINARY} "s/ /:space:/g"') + for CF in ${CONFIG_FILES}; do + Report "postgresql_config_file[]=${CF}" + LogText "Found configuration file (${CF})" + done + fi +# +################################################################################# +# # Test : DBS-1840 # Description : Check if Oracle is being used # Notes : tnslsnr: Oracle listener |