Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/acceptance/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,19 @@ function assert_testing_app_enabled() {

# check if certain apache_module is enabled
# $1 admin authentication string username:password
# $2 the full url to the testing app
# $2 the full url to the testing app on the server to check
# $3 Module to check for
# $4 text description of the server being checked, e.g. "local", "remote"
# return 0 if given module is enabled, else return with 1
function check_apache_module_enabled() {
# test if mod_rewrite is enabled
CURL_RESULT=`curl -k -s -u $1 $2apache_modules/$3`
STATUS_CODE=`echo ${CURL_RESULT} | xmllint --xpath "string(ocs/meta/statuscode)" -`
if [[ ${STATUS_CODE} -ne 200 ]]
then
echo -n "Could not reliably determine if '$3' module is enabled, because "
echo -n "Could not reliably determine if '$3' module is enabled on the $4 server, because "
echo ${CURL_RESULT} | xmllint --xpath "string(ocs/meta/message)" -
echo ""
return 1
fi
return 0
Expand Down Expand Up @@ -534,7 +536,7 @@ then
remote_occ ${ADMIN_AUTH} ${OCC_URL} "maintenance:update:htaccess"
[[ $? -eq 0 ]] || { echo "${HTACCESS_UPDATE_FAILURE_MSG}"; }
# check if mod_rewrite module is enabled
check_apache_module_enabled ${ADMIN_AUTH} ${TESTING_APP_URL} "mod_rewrite"
check_apache_module_enabled ${ADMIN_AUTH} ${TESTING_APP_URL} "mod_rewrite" "local"

if [ -n "${TEST_SERVER_FED_URL}" ]
then
Expand All @@ -543,7 +545,7 @@ then
remote_occ ${ADMIN_AUTH} ${OCC_FED_URL} "maintenance:update:htaccess"
[[ $? -eq 0 ]] || { echo "${HTACCESS_UPDATE_FAILURE_MSG/local/federated}"; }
# check if mod_rewrite module is enabled
check_apache_module_enabled ${ADMIN_AUTH} ${TESTING_APP_URL} "mod_rewrite"
check_apache_module_enabled ${ADMIN_AUTH} ${TESTING_APP_FED_URL} "mod_rewrite" "remote"
fi
else
echo "Using php inbuilt server for running scenario ..."
Expand Down