From 7c74f69d3f779a3f99b137449e84b5f3e09b6608 Mon Sep 17 00:00:00 2001 From: Remy van der Wereld Date: Mon, 1 Jul 2024 10:50:06 +0200 Subject: [PATCH] Test removing volume --- .github/workflows/e2e-tests.yml | 6 +++++- app/deploy/docker-entrypoint.development.sh | 2 +- docker-compose.yml | 3 --- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 57d4ec642..9c900d618 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -23,6 +23,10 @@ jobs: - run: docker network create zaken_network - run: docker network create top_and_zaak_backend_bridge - run: docker-compose -f docker-compose.local.yml up --detach + + + - run: docker volume rm postgresql-data + - run: sleep 30 - run: bash bin/setup_credentials.sh - run: ./e2e-tests/fix_models.sh @@ -44,7 +48,7 @@ jobs: working-directory: e2e-tests - name: Run tests - run: API_HOST=http://localhost:8080/api/v1 python3 -m unittest + run: API_HOST=http://127.0.0.1:8080/api/v1 python3 -m unittest working-directory: e2e-tests ################################################### diff --git a/app/deploy/docker-entrypoint.development.sh b/app/deploy/docker-entrypoint.development.sh index 774779375..bd2fd497b 100755 --- a/app/deploy/docker-entrypoint.development.sh +++ b/app/deploy/docker-entrypoint.development.sh @@ -15,7 +15,7 @@ python manage.py collectstatic --no-input chmod -R 777 /static # echo Clear tables -python manage.py shell -c "from django.db import connection; cursor = connection.cursor(); cursor.execute('drop table if exists "django_migrations" cascade; drop table if exists "django_content_type" cascade; drop table if exists "auth_permission" cascade; drop table if exists "auth_group" cascade; drop table if exists "auth_group_permissions" cascade; drop table if exists "users_user" cascade; drop table if exists "users_user_groups" cascade; drop table if exists "users_user_user_permissions" cascade; drop table if exists "django_admin_log" cascade; drop table if exists "django_session" cascade;'); cursor.close();" +# python manage.py shell -c "from django.db import connection; cursor = connection.cursor(); cursor.execute('drop table if exists "django_migrations" cascade; drop table if exists "django_content_type" cascade; drop table if exists "auth_permission" cascade; drop table if exists "auth_group" cascade; drop table if exists "auth_group_permissions" cascade; drop table if exists "users_user" cascade; drop table if exists "users_user_groups" cascade; drop table if exists "users_user_user_permissions" cascade; drop table if exists "django_admin_log" cascade; drop table if exists "django_session" cascade;'); cursor.close();" echo Apply migrations python manage.py migrate --noinput diff --git a/docker-compose.yml b/docker-compose.yml index 874be84b7..9c9423df3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,5 @@ services: - 5678:5678 env_file: - .env - command: bash -c "/app/wait-for.sh zaak-redis:6379 && /app/wait-for.sh database:5432 && /app/deploy/docker-entrypoint.development.sh" - # volumes: - # - ./app:/app stdin_open: true tty: true