summaryrefslogtreecommitdiffstats
path: root/config/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'config/rpm')
-rw-r--r--config/rpm/settings.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/rpm/settings.py b/config/rpm/settings.py
index 1ecde70c37..ce0d2c5e16 100644
--- a/config/rpm/settings.py
+++ b/config/rpm/settings.py
@@ -13,6 +13,17 @@ DATABASES = {
}
}
+# 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': 'var/lib/awx/awx.sqlite3',
+ # Test database cannot be :memory: for celery/inventory tests.
+ 'TEST_NAME': '/var/lib/awx/awx_test.sqlite3',
+ }
+ }
+
STATIC_ROOT = '/var/lib/awx/public/static'
PROJECTS_ROOT = '/var/lib/awx/projects'