Skip to content

Commit

Permalink
Redefined test with requirepass option
Browse files Browse the repository at this point in the history
  • Loading branch information
mboelen committed Aug 12, 2016
1 parent 2dae957 commit c761fe8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/tests_databases
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,21 @@
#################################################################################
#
# Test : DBS-1884
# Description : Determine Redis configuration option: secureauth
# Description : Determine Redis configuration option: requirepass
if [ ${REDIS_RUNNING} -eq 1 -a ${REDIS_CONFIGURATION_FOUND} -eq 1 ]; then PREQS_METS="YES"; else PREQS_MET="NO"; fi
Register --test-no DBS-1884 --weight L --network NO --preqs-met "${PREQS_MET}" --category security --description "Redis: secureauth option configured"
Register --test-no DBS-1884 --weight L --network NO --preqs-met "${PREQS_MET}" --category security --description "Redis: requirepass option configured"
if [ ${SKIPTEST} -eq 0 ]; then
if FileIsReadable ${REDIS_CONFIGURATION}; then
if SearchItem "^secureauth" "${REDIS_CONFIGURATION}" "--sensitive"; then
LogText "Result: found 'secureauth' configured"
if SearchItem "^requirepass" "${REDIS_CONFIGURATION}" "--sensitive"; then
LogText "Result: found 'requirepass' configured"
AddHP 3 3
Display --indent 4 --text "- Redis (secureauth configured)" --result "${STATUS_FOUND}" --color GREEN
Report "redis_secureauth=1"
Display --indent 4 --text "- Redis (requirepass configured)" --result "${STATUS_FOUND}" --color GREEN
Report "redis_requirepass=1"
else
AddHP 0 3
Display --indent 4 --text "- Redis (secureauth configured)" --result "${STATUS_NOT_FOUND}" --color YELLOW
ReportSuggestion "${TEST_NO}" "Configure the 'secureauth' setting for Redis" "${REDIS_CONFIGURATION}" "solution:configure 'secureauth' setting"
Report "redis_secureauth=0"
Display --indent 4 --text "- Redis (requirepass configured)" --result "${STATUS_NOT_FOUND}" --color YELLOW
ReportSuggestion "${TEST_NO}" "Configure the 'requirepass' setting for Redis" "${REDIS_CONFIGURATION}" "solution:configure 'requirepass' setting"
Report "redis_requirepass=0"
fi
else
LogText "Result: test skipped, as we can't read configuration file"
Expand Down

0 comments on commit c761fe8

Please sign in to comment.