diff --git a/test.sh b/test.sh index 61b6c3a6..8100f65d 100755 --- a/test.sh +++ b/test.sh @@ -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=$?