From 5f8778c559ee51dfdad692d595e542747caffc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Wed, 1 Jul 2020 16:03:41 +0200 Subject: [PATCH] fix(scripts): fix run-tests.sh go test flags --- scripts/run-tests.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 22ac99d355..a456d1aa68 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -50,9 +50,6 @@ function usage() { exit $1; } -SCW_DEBUG="false" -OPT_UPDATE_GOLDENS="false" -OPT_UPDATE_CASSETTES="false" OPT_RUN_SCOPE="" ## @@ -66,17 +63,17 @@ do OPT_RUN_SCOPE="$1" ;; -u|--update) - OPT_UPDATE_GOLDENS="true" - OPT_UPDATE_CASSETTES="true" + OPT_UPDATE_GOLDENS="-goldens" + OPT_UPDATE_CASSETTES="-cassettes" ;; -g|--update-goldens) - OPT_UPDATE_GOLDENS="true" + OPT_UPDATE_GOLDENS="-goldens" ;; -c|--update-cassettes) - OPT_UPDATE_CASSETTES="true" + OPT_UPDATE_CASSETTES="-cassettes" ;; -D|--debug) - SCW_DEBUG="true" + SCW_DEBUG="-debug" ;; -h|--help) usage esac @@ -93,4 +90,4 @@ if [[ ${OPT_UPDATE_GOLDENS} == "true" ]] && [[ -z ${OPT_RUN_SCOPE} ]]; then find . -type f -name "*.golden" -exec rm -f {} \; fi -SCW_DEBUG=$SCW_DEBUG CLI_UPDATE_GOLDENS=$OPT_UPDATE_GOLDENS CLI_UPDATE_CASSETTES=$OPT_UPDATE_CASSETTES go test -v $ROOT_DIR/... -timeout 20m -run=$OPT_RUN_SCOPE +go test -v $SCW_DEBUG $OPT_UPDATE_GOLDENS $OPT_UPDATE_CASSETTES $ROOT_DIR/... -timeout 20m -run=$OPT_RUN_SCOPE