1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-05 02:31:33 +00:00

Implement support for optional arguments to docker run inside script

This commit is contained in:
Kristóf Tóth 2018-05-04 10:24:06 +02:00
parent f4bbf5477d
commit cb6f670329

View File

@ -99,13 +99,14 @@ run_test()
docker run --rm \
-p $TEST_PORT:$TEST_PORT \
${mount_volumes} \
${@:-} \
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
}
build_and_run_test()
{
build_test
run_test
run_test $@
}
run_frontend()
@ -124,7 +125,7 @@ start_test()
{
trap 'exit' INT TERM
trap 'kill 0' EXIT
run_frontend & build_and_run_test
run_frontend & build_and_run_test $@
wait
}
@ -142,7 +143,7 @@ case ${1:-} in
build_test_withfrontend
;;
start)
start_test
start_test ${@:2}
;;
*)
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"