summaryrefslogtreecommitdiff
path: root/src/mailman/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/testing')
-rw-r--r--src/mailman/testing/layers.py15
-rw-r--r--src/mailman/testing/mail_archive.cfg4
-rw-r--r--src/mailman/testing/mhonarc.cfg4
-rw-r--r--src/mailman/testing/testing.cfg7
4 files changed, 24 insertions, 6 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py
index 3a3e1f684..99450d143 100644
--- a/src/mailman/testing/layers.py
+++ b/src/mailman/testing/layers.py
@@ -114,14 +114,25 @@ class ConfigLayer(MockAndMonkeyLayer):
# runners) we'll need a file that we can specify to the with the -C
# option. Craft the full test configuration string here, push it, and
# also write it out to a temp file for -C.
+ #
+ # Create a dummy postfix.cfg file so that the test suite doesn't try
+ # to run the actual postmap command, which may not exist anyway.
+ postfix_cfg = os.path.join(cls.var_dir, 'postfix.cfg')
+ with open(postfix_cfg, 'w') as fp:
+ print(dedent("""
+ [postfix]
+ postmap_command: true
+ """), file=fp)
test_config = dedent("""
[mailman]
layout: testing
[paths.testing]
- var_dir: %s
+ var_dir: {0}
[devmode]
testing: yes
- """ % cls.var_dir)
+ [mta]
+ configuration: {1}
+ """.format(cls.var_dir, postfix_cfg))
# Read the testing config and push it.
test_config += resource_string('mailman.testing', 'testing.cfg')
config.create_paths = True
diff --git a/src/mailman/testing/mail_archive.cfg b/src/mailman/testing/mail_archive.cfg
new file mode 100644
index 000000000..0011781ba
--- /dev/null
+++ b/src/mailman/testing/mail_archive.cfg
@@ -0,0 +1,4 @@
+[general]
+base_url: http://go.mail-archive.dev/
+
+recipient: archive@mail-archive.dev
diff --git a/src/mailman/testing/mhonarc.cfg b/src/mailman/testing/mhonarc.cfg
new file mode 100644
index 000000000..11a15eef3
--- /dev/null
+++ b/src/mailman/testing/mhonarc.cfg
@@ -0,0 +1,4 @@
+[general]
+base_url: http://$hostname/archives/$fqdn_listname
+
+command: /bin/echo "/usr/bin/mhonarc -add -dbfile $PRIVATE_ARCHIVE_FILE_DIR/${listname}.mbox/mhonarc.db -outdir $VAR_DIR/mhonarc/${listname} -stderr $LOG_DIR/mhonarc -stdout $LOG_DIR/mhonarc -spammode -umask 022"
diff --git a/src/mailman/testing/testing.cfg b/src/mailman/testing/testing.cfg
index 141d74a8f..85b284cfe 100644
--- a/src/mailman/testing/testing.cfg
+++ b/src/mailman/testing/testing.cfg
@@ -31,7 +31,7 @@ lmtp_port: 9024
incoming: mailman.testing.mta.FakeMTA
[passwords]
-path: python:mailman.testing.passlib
+configuration: python:mailman.testing.passlib
[webservice]
port: 9001
@@ -74,12 +74,11 @@ enable: yes
[archiver.mail_archive]
enable: yes
-base_url: http://go.mail-archive.dev/
-recipient: archive@mail-archive.dev
+configuration: python:mailman.testing.mail_archive
[archiver.mhonarc]
enable: yes
-command: /bin/echo "/usr/bin/mhonarc -add -dbfile $PRIVATE_ARCHIVE_FILE_DIR/${listname}.mbox/mhonarc.db -outdir $VAR_DIR/mhonarc/${listname} -stderr $LOG_DIR/mhonarc -stdout $LOG_DIR/mhonarc -spammode -umask 022"
+configuration: python:mailman.testing.mhonarc
[language.ja]
description: Japanese