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/layers.py | |
| parent | 23fca2302ea2a8c5bad0a7aa450ea210ace7cf27 (diff) | |
| download | mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.tar.gz mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.tar.zst mailman-89f6e779db51478ea95b71f2ad3dc9d7f5f51e05.zip | |
Diffstat (limited to 'src/mailman/testing/layers.py')
| -rw-r--r-- | src/mailman/testing/layers.py | 15 |
1 files changed, 13 insertions, 2 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 |
