From 92ec849fc18d7cb610839abe2213ce30ceced46b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 2 Sep 2020 20:09:11 +1000 Subject: [PATCH] Add ci settings file for postgresql database --- InvenTree/InvenTree/ci_postgresql.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 InvenTree/InvenTree/ci_postgresql.py diff --git a/InvenTree/InvenTree/ci_postgresql.py b/InvenTree/InvenTree/ci_postgresql.py new file mode 100644 index 0000000000..ba9aa26bb1 --- /dev/null +++ b/InvenTree/InvenTree/ci_postgresql.py @@ -0,0 +1,17 @@ +""" +Configuration file for running tests against a MySQL database. +""" + +from InvenTree.settings import * + +# Override the 'test' database +if 'test' in sys.argv: + eprint('InvenTree: Running tests - Using MySQL test database') + + DATABASES['default'] = { + # Ensure postgresql backend is being used + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'inventree_test_db', + 'USER': 'postgres', + 'PASSWORD': '', + }