diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2015-04-29 20:43:07 +0000 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2015-04-29 20:43:28 +0000 |
commit | b9a2e69201e8e5d15f67dc1cd7fdaea4d1a6e561 (patch) | |
tree | 43b45eff55ee54e3fc3ce03193d16b5ba953466d | |
parent | 0b47bc5948fe16e2d3ba07c93e816852a8cb6f0e (diff) | |
download | ansible-b9a2e69201e8e5d15f67dc1cd7fdaea4d1a6e561.tar.gz ansible-b9a2e69201e8e5d15f67dc1cd7fdaea4d1a6e561.tar.xz ansible-b9a2e69201e8e5d15f67dc1cd7fdaea4d1a6e561.zip |
Mailman: add the conffile for unit tests
-rw-r--r-- | roles/mailman/files/settings_test.py | 18 | ||||
-rw-r--r-- | roles/mailman/tasks/main.yml | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/roles/mailman/files/settings_test.py b/roles/mailman/files/settings_test.py new file mode 100644 index 000000000..30a515164 --- /dev/null +++ b/roles/mailman/files/settings_test.py @@ -0,0 +1,18 @@ +#-*- coding: utf-8 -*- + +""" +Copy of the Django settings file, but with the database set for unit tests. +""" + +from settings import * +try: + from settings_local import * +except ImportError: + pass + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:', + } +} diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index d46951530..751a7a586 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -151,6 +151,13 @@ tags: - config +- name: install the hyperkitty settings test file + copy: src=settings_test.py + dest="{{ mailman_webui_confdir }}/settings_test.py" + owner=root group=root mode=0600 + tags: + - config + - name: install the hyperkitty urls file copy: src=urls.py dest="{{ mailman_webui_confdir }}/urls.py" |