diff options
| author | Barry Warsaw | 2012-11-04 15:49:08 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2012-11-04 15:49:08 -0500 |
| commit | 89f6e779db51478ea95b71f2ad3dc9d7f5f51e05 (patch) | |
| tree | e1054919eb00e3abf73b4387277c4c79aca52b64 /src/mailman/testing | |
| parent | 23fca2302ea2a8c5bad0a7aa450ea210ace7cf27 (diff) | |
| download | mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.tar.gz mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.tar.zst mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.zip | |
Configuration
-------------
* `[passlib]path` configuration variable renamed to `[passlib]configuration`.
* Postfix-specific configurations in the `[mta]` section are moved to a
separate file, named by the `[mta]configuration` variable.
* In the new `postfix.cfg` file, `postfix_map_cmd` is renamed to
`postmap_command`.
Also:
* More Python 2.7-isms, use assertMultiLineEqual() directly.
* Added external_configuration() and load_external() to mailman.config.config
* ConfigLayer does a blanket set of [postfix]postmap_command so subtests
generally won't have to.
Diffstat (limited to 'src/mailman/testing')
| -rw-r--r-- | src/mailman/testing/layers.py | 15 | ||||
| -rw-r--r-- | src/mailman/testing/testing.cfg | 2 |
2 files changed, 14 insertions, 3 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/testing.cfg b/src/mailman/testing/testing.cfg index 141d74a8f..7d57aa681 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 |
