diff --git a/services/scripts/run_integration_tests.sh b/services/scripts/run_integration_tests.sh index 53e49027a..6d32af50a 100755 --- a/services/scripts/run_integration_tests.sh +++ b/services/scripts/run_integration_tests.sh @@ -1,47 +1,47 @@ #!/usr/bin/env bash set -e export COMM_TEST_SERVICES=1 -export COMM_SERVICES_DEV_MODE=1 +export COMM_SERVICES_SANDBOX=1 SERVICES=$(./scripts/list_services.sh) run_integration_test () { echo "integration tests tests will be run for the $1 service" # add -- --nocapture in the end to enable logs cargo test "$1"_test --test '*' --manifest-path=commtest/Cargo.toml #-- --nocapture } list_expected () { echo "Expected one of these:"; echo "$SERVICES"; echo "all"; } if [[ -z "$1" ]]; then echo "No service specified"; list_expected; exit 1; fi if [[ "$1" == "all" ]]; then for SERVICE in "$SERVICES"; do run_integration_test "$SERVICE" done exit 0; fi; SERVICE=$(grep "$1" <<< "$SERVICES") if [[ "$SERVICE" != "$1" ]]; then echo "No such service: $1"; list_expected; exit 1; fi; set -o allexport source .env set +o allexport run_integration_test "$SERVICE" diff --git a/services/scripts/run_unit_tests.sh b/services/scripts/run_unit_tests.sh index 2880c2bcd..833663c59 100755 --- a/services/scripts/run_unit_tests.sh +++ b/services/scripts/run_unit_tests.sh @@ -1,43 +1,43 @@ #!/usr/bin/env bash set -e export COMM_TEST_SERVICES=1 -export COMM_SERVICES_DEV_MODE=1 +export COMM_SERVICES_SANDBOX=1 SERVICES=$(./scripts/list_services.sh) run_unit_test () { echo "unit tests will be run for the $1 service" docker-compose build "$1"-server docker-compose run "$1"-server } list_expected () { echo "Expected one of these:"; echo "$SERVICES"; } if [[ -z "$1" ]]; then echo "No service specified"; list_expected; exit 1; fi if [[ "$1" == "all" ]]; then for SERVICE in $SERVICES; do run_unit_test "$SERVICE" done exit 0; fi; SERVICE=$(grep "$1" <<< "$SERVICES") if [[ "$SERVICE" != "$1" ]]; then echo "No such service: $1"; list_expected; exit 1; fi; run_unit_test "$SERVICE"