diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | db/tests.db | 1 | ||||
-rw-r--r-- | include/consts | 2 | ||||
-rw-r--r-- | include/tests_databases | 28 |
4 files changed, 32 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e9600cf5..0a692300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ release can be specified as additional argument. Tests ------ +* DBS-1880 - Initial support for Redis server * PHP-2374 - Changed text and cleanups * PHP-2376 - Log result to log file instead of report diff --git a/db/tests.db b/db/tests.db index b12c96e1..1d8901df 100644 --- a/db/tests.db +++ b/db/tests.db @@ -86,6 +86,7 @@ DBS-1826:test:security:databases::Checking active PostgreSQL processes: DBS-1840:test:security:databases::Checking active Oracle processes: #DBS-1842:test:security:databases::Checking Oracle home paths: DBS-1860:test:security:databases::Checking active DB2 instances: +DBS-1880:test:security:databases::Checking active Redis processes: FINT-4310:test:security:file_integrity::AFICK availability: FINT-4314:test:security:file_integrity::AIDE availability: FINT-4315:test:security:file_integrity::Check AIDE configuration file: diff --git a/include/consts b/include/consts index 68074ddc..3b30ee97 100644 --- a/include/consts +++ b/include/consts @@ -75,6 +75,7 @@ unset LANG CUSTOM_URL_APPEND="" CUSTOM_URL_PREPEND="" CUSTOM_URL_PROTOCOL="" + DATABASE_ENGINE_RUNNING=0 DB2_RUNNING=0 DEVELOPER_MODE=0 DISCOVERED_BINARIES="" @@ -150,6 +151,7 @@ unset LANG PRIVILEGED=0 PROFILEVALUE="" PSBINARY="ps" + REDIS_RUNNING=0 REMOTE_LOGGING_ENABLED=0 RKHUNTERBINARY="" RPMBINARY="" diff --git a/include/tests_databases b/include/tests_databases index b57a964e..34e63a42 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -43,6 +43,7 @@ Display --indent 2 --text "- MySQL process status" --result "${STATUS_FOUND}" --color GREEN LogText "Result: MySQL is active" MYSQL_RUNNING=1 + DATABASE_ENGINE_RUNNING=1 Report "mysql_running=${MYSQL_RUNNING}" fi fi @@ -97,6 +98,7 @@ Display --indent 2 --text "- PostgreSQL processes status" --result "${STATUS_FOUND}" --color GREEN LogText "Result: PostgreSQL is active" POSTGRESQL_RUNNING=1 + DATABASE_ENGINE_RUNNING=1 Report "postgresql_running=${POSTGRESQL_RUNNING}" else if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- PostgreSQL processes status" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi @@ -126,6 +128,7 @@ Display --indent 2 --text "- Oracle processes status" --result "${STATUS_FOUND}" --color GREEN LogText "Result: Oracle is active" ORACLE_RUNNING=1 + DATABASE_ENGINE_RUNNING=1 Report "oracle_running=${ORACLE_RUNNING}" fi fi @@ -151,6 +154,7 @@ Display --indent 2 --text "- DB2 instance running" --result "${STATUS_FOUND}" --color GREEN LogText "Result: At least one DB2 instance is running" DB2_RUNNING=1 + DATABASE_ENGINE_RUNNING=1 Report "db2_running=${DB2_RUNNING}" else if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- DB2 instance running" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi @@ -160,6 +164,30 @@ # ################################################################################# # + # Test : DBS-1880 + # Description : Determine if redis is running + Register --test-no DBS-1880 --weight L --network NO --category security --description "Check for active Redis server" + if [ ${SKIPTEST} -eq 0 ]; then + if IsRunning redis-server; then + Display --indent 2 --text "- Redis (server) status" --result "${STATUS_FOUND}" --color GREEN + LogText "Result: Redit is running" + REDIS_RUNNING=1 + DATABASE_ENGINE_RUNNING=1 + Report "redis_running=${redis_RUNNING}" + else + if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- Redis (server) status" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi + LogText "Result: No Redis processes are running" + fi + fi +# +################################################################################# +# + if [ ${DATABASE_ENGINE_RUNNING} -eq 0 ]; then + Display --indent 4 --text "No database engines found" + fi +# +################################################################################# +# WaitForKeyPress |