mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 06:15:36 -04:00
Add --postfix-ctl flag.
This commit is contained in:
parent
0f4c5c2305
commit
a29a99fb6f
2 changed files with 5 additions and 2 deletions
|
|
@ -28,9 +28,11 @@ class Installer(plugins_common.Installer):
|
|||
|
||||
@classmethod
|
||||
def add_parser_arguments(cls, add):
|
||||
add("ctl", default="postfix",
|
||||
help="Path to the 'postfix' control program.")
|
||||
add("config-dir", help="Path to the directory containing the "
|
||||
"Postfix main.cf file to modify instead of using the "
|
||||
"default configuration paths")
|
||||
"default configuration paths.")
|
||||
add("config-utility", default="postconf",
|
||||
help="Path to the 'postconf' executable.")
|
||||
|
||||
|
|
|
|||
|
|
@ -32,13 +32,14 @@ class InstallerTest(certbot_test_util.ConfigTestCase):
|
|||
self.config.postfix_config_utility = "postconf"
|
||||
|
||||
def test_add_parser_arguments(self):
|
||||
options = set(('ctl', 'config-dir', 'config-utility',))
|
||||
mock_add = mock.MagicMock()
|
||||
|
||||
from certbot_postfix import installer
|
||||
installer.Installer.add_parser_arguments(mock_add)
|
||||
|
||||
for call in mock_add.call_args_list:
|
||||
self.assertTrue(call[0][0] in ('config-dir', 'config-utility'))
|
||||
self.assertTrue(call[0][0] in options)
|
||||
|
||||
def test_no_postconf_prepare(self):
|
||||
installer = self._create_installer()
|
||||
|
|
|
|||
Loading…
Reference in a new issue