From 9b91e4452c7df734ef7743375ef39ea82637f2d5 Mon Sep 17 00:00:00 2001 From: Topvennie Date: Thu, 23 May 2024 10:49:27 +0200 Subject: [PATCH] chore: move filling db to outside --- test.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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=$?