-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
29 lines (22 loc) · 875 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Tests.
# =============================================================================
.PHONY: dbshell drop-test-db test
# make test
# make test TARGET=iaso.tests.api.test_profiles.ProfileAPITestCase
test:
docker compose exec iaso ./manage.py test \
--noinput --keepdb --failfast --settings=hat.settings_test \
$(TARGET)
# When the migration history is changed, we need to drop the DB before running the tests suite with `--keepdb`.
drop-test-db:
docker compose exec db psql -U postgres -c "drop database if exists test_iaso"
dbshell:
docker compose exec iaso ./manage.py dbshell
# Django.
# =============================================================================
.PHONY: django_admin
# make django_admin
# make django_admin COMMAND=shell_plus
# make django_admin COMMAND=createsuperuser
django_admin:
docker compose exec -ti iaso ./manage.py $(COMMAND)