Test setting webroot-path in a config file

This commit is contained in:
Peter Eckersley 2016-01-28 17:14:55 -08:00
parent bf7f9d2cc1
commit 4dc5c0462b
2 changed files with 8 additions and 2 deletions

View file

@ -383,9 +383,9 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
self.assertRaises(errors.Error, cli.prepare_and_parse_args, plugins, short_args)
def _webroot_map_test(self, map_arg, path_arg, domains_arg,
expected_map, expectect_domains):
expected_map, expectect_domains, extra_args=[]):
plugins = disco.PluginsRegistry.find_all()
webroot_map_args = []
webroot_map_args = [] + extra_args
if map_arg:
webroot_map_args.extend(["--webroot-map", map_arg])
if path_arg:
@ -427,6 +427,9 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
expected_map[u"eg2.com"] = u"/tmp"
self._webroot_map_test(None, "/tmp", None, expected_map, domains)
extra_args = ['-c', test_util.vector_path('webrootconftest.ini')]
self._webroot_map_test(None, None, None, expected_map, domains, extra_args)
@mock.patch('letsencrypt.cli._suggest_donate')
@mock.patch('letsencrypt.crypto_util.notAfter')

View file

@ -0,0 +1,3 @@
webroot
webroot-path = /tmp
domains = eg.com, eg2.com