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
8 changes: 5 additions & 3 deletions _common/tests.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
# path
if [[ $OSTYPE =~ msys|cygwin ]]; then
TEST_CONTAINER_ROOT_PATH=//var/www/html
TEST_CONTAINER_BASH=//bin/bash
else
TEST_CONTAINER_ROOT_PATH=/var/www/html
TEST_CONTAINER_BASH=/bin/bash
fi

# Record the start time for unit tests for later log review
Expand Down Expand Up @@ -93,17 +95,17 @@ function do_test_print_link_report() {
#
function do_test_print_container_error_logs() {
local CONTAINER="$1"
docker exec "${CONTAINER}" sh $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh report
docker exec "${CONTAINER}" $TEST_CONTAINER_BASH $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh report
}

function do_test_links_setup() {
local CONTAINER="$1"
docker exec "${CONTAINER}" sh $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh setup
docker exec "${CONTAINER}" $TEST_CONTAINER_BASH $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh setup
docker kill "${CONTAINER}" --signal="USR1"
}

function do_test_links_cleanup() {
local CONTAINER="$1"
docker exec "${CONTAINER}" sh $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh cleanup
docker exec "${CONTAINER}" $TEST_CONTAINER_BASH $TEST_CONTAINER_ROOT_PATH/_common/tests.container.sh cleanup
docker kill "${CONTAINER}" --signal="USR1"
}