diff --git a/Makefile.local b/Makefile.local --- a/Makefile.local +++ b/Makefile.local @@ -37,7 +37,7 @@ .PHONY: run-migrations-test run-migrations-test: - rm -f swh-web-test.sqlite3 + rm -f /tmp/swh-web-test.sqlite3 django-admin migrate --settings=$(SETTINGS_TEST) -v0 add-users-test: run-migrations-test diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -35,7 +35,7 @@ }; function getDatabase() { - const db = new sqlite3.Database('./swh-web-test.sqlite3'); + const db = new sqlite3.Database('/tmp/swh-web-test.sqlite3'); // to prevent "database is locked" error when running tests db.run('PRAGMA journal_mode = WAL;'); return db; diff --git a/swh/web/settings/tests.py b/swh/web/settings/tests.py --- a/swh/web/settings/tests.py +++ b/swh/web/settings/tests.py @@ -127,7 +127,7 @@ # using sqlite3 for frontend tests settings.DATABASES["default"].update( - {"ENGINE": "django.db.backends.sqlite3", "NAME": "swh-web-test.sqlite3"} + {"ENGINE": "django.db.backends.sqlite3", "NAME": "/tmp/swh-web-test.sqlite3"} ) # to prevent "database is locked" error when running cypress tests