Signalen / backend

Backend for Signalen, an application that helps cities manage and prioritize nuisance reports.
https://signalen.org
Mozilla Public License 2.0
5 stars 5 forks source link

Do not depend on external system for loading testing assets #68

Open bartjkdp opened 4 years ago

bartjkdp commented 4 years ago

For setting up the testing assets for running the end-to-end tests we currently depend on CBS.nl and Amsterdam infrastructure:

# Run database migrations
python manage.py migrate

# Load areas
python manage.py load_areas stadsdeel
python manage.py load_areas cbs-gemeente-2019
python manage.py load_areas sia-stadsdeel

# Create signals.admin@example.com user
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.filter(username='signals.admin@example.com').exists() or User.objects.create_superuser('signals.admin@example.com', 'signals.admin@example.com', 'password')" | python manage.py shell

https://github.com/Amsterdam/signals-frontend/blob/23bb1c7839083079ce35dbf4af8c77b823618056/scripts/initialize-backend.sh#L10-L19

I would like to propose to not depend on these external systems to improve the reliability of the end-to-end tests.

Related to Signalen/backend#35.