diff --git a/bin/run-unit-tests.sh b/bin/run-unit-tests.sh index 7a0b299c4..15020bc78 100755 --- a/bin/run-unit-tests.sh +++ b/bin/run-unit-tests.sh @@ -1,5 +1,13 @@ #!/bin/bash +# unset all environment variables which have been set in .env file +unset $(sed -n -e 's/^\s*\([^#][^=]*\)=.*/\1/p' .env) + +# set environment variables from .env-test file +set -o allexport +source .env-test +set +o allexport + set -ex # wait on database in DATABASE_URL to be ready @@ -10,4 +18,4 @@ urlwait http://elasticsearch7:9200 60 ./manage.py es7_init --migrate-writes --migrate-reads -./manage.py test --noinput --nologcapture -a '!search_tests' +./manage.py test --noinput