Skip to content

Commit

Permalink
chore: move filling db to outside
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie authored and EwoutV committed May 23, 2024
1 parent 3ca4a5e commit 9b91e44
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ cypress_exit=0
vitest_exit=0
django_exit=0

echo "Filling up database with test data"
docker exec backend sh -c "python manage.py flush --no-input; python manage.py migrate;
python manage.py loaddata authentication/fixtures/realistic/*;
python manage.py loaddata notifications/fixtures/realistic/*;
python manage.py loaddata api/fixtures/realistic/*;"

if [ "$frontend" = true ]; then
echo "Running frontend tests..."
echo "Filling up database with test data"
docker exec backend sh -c "python manage.py flush --no-input; python manage.py migrate;
python manage.py loaddata notifications/fixtures/realistic/*;
python manage.py loaddata authentication/fixtures/realistic/*;
python manage.py loaddata api/fixtures/realistic/*;"
echo "Running Cypress tests..."
docker-compose -f test.yml up --exit-code-from cypress --abort-on-container-exit cypress
cypress_exit=$?
Expand Down

0 comments on commit 9b91e44

Please sign in to comment.