Skip to content
Snippets Groups Projects
Commit 190ea5e3 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[settings] Use in-memory sqlite database for cmdline tests

parent 3a7ce209
No related branches found
No related tags found
1 merge request!194Scheduler
Pipeline #
...@@ -40,6 +40,9 @@ import sys ...@@ -40,6 +40,9 @@ import sys
if '-k' in sys.argv or '--keepdb' in sys.argv: if '-k' in sys.argv or '--keepdb' in sys.argv:
# keeps the SQLite3 database around to avoid re-running migrations # keeps the SQLite3 database around to avoid re-running migrations
DATABASES['default']['TEST'] = {'NAME': 'test.sql3'} DATABASES['default']['TEST'] = {'NAME': 'test.sql3'}
elif 'beat.cmdline' in sys.argv:
# make it in-memory
DATABASES['default']['NAME'] = ':memory:'
PREFIX = os.path.join(os.getcwd(), 'test_prefix') PREFIX = os.path.join(os.getcwd(), 'test_prefix')
ALGORITHMS_ROOT = os.path.join(PREFIX, 'algorithms') ALGORITHMS_ROOT = os.path.join(PREFIX, 'algorithms')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment