mirror of
https://github.com/ansible/awx.git
synced 2026-04-01 08:15:09 -02:30
Added setting for production builds to be able to run tests using SQLite.
This commit is contained in:
@@ -22,13 +22,13 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
# Continue to use SQLite for unit tests instead of PostgreSQL.
|
||||
if 'test' in sys.argv:
|
||||
# Use SQLite for unit tests instead of PostgreSQL.
|
||||
if len(sys.argv) >= 2 and sys.argv[1] == 'test':
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'awx.sqlite3'),
|
||||
# Test database cannot be :memory: for celery/inventory tests to work.
|
||||
# Test database cannot be :memory: for celery/inventory tests.
|
||||
'TEST_NAME': os.path.join(BASE_DIR, 'awx_test.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user