Skip to content

Commit

Permalink
deactivate the venv at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdev8 committed Mar 21, 2024
1 parent 143bcf8 commit 4416588
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions frontend/tests/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ done

cleanup() {
echo -e "\nCleaning up..."
if type deactivate >/dev/null 2>&1; then
deactivate
fi
if [ -n "$BACKEND_PID" ] ; then
kill $BACKEND_PID > /dev/null 2>&1
echo "| backend server stopped"
Expand Down Expand Up @@ -138,7 +141,7 @@ finish() {
trap cleanup SIGINT SIGTERM
trap finish EXIT

echo "starting backend server..."
echo "Starting backend server..."
unset POSTGRES_NAME POSTGRES_USER POSTGRES_PASSWORD
export CISO_ASSISTANT_URL=http://localhost:4173
export ALLOWED_HOSTS=localhost
Expand Down Expand Up @@ -187,15 +190,16 @@ export MAILER_WEB_SERVER_PORT=$MAILER_WEB_SERVER_PORT
cd $APP_DIR/frontend/

if (( ${#TEST_PATHS[@]} == 0 )); then
echo "running every functional test"
echo "| running every functional test"
else
echo "running tests: ${TEST_PATHS[@]}"
echo "| running tests: ${TEST_PATHS[@]}"
fi
if (( ${#SCRIPT_LONG_ARGS[@]} == 0 )); then
echo "without args"
echo "| without args"
else
echo "with args: ${SCRIPT_LONG_ARGS[@]}"
echo "| with args: ${SCRIPT_LONG_ARGS[@]}"
fi
echo "=========================================================================================="

if [[ " ${SCRIPT_SHORT_ARGS[@]} " =~ " -q " ]] ; then
npx playwright test ./tests/functional/"${TEST_PATHS[@]}" -x --project=chromium "${SCRIPT_LONG_ARGS[@]}"
Expand Down

0 comments on commit 4416588

Please sign in to comment.