mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Merge pull request #3011 from certbot/webroot-map-renewal
Allow modifying webroot-map during renewal
This commit is contained in:
+4
-1
@@ -301,7 +301,10 @@ def _renew_describe_results(config, renew_successes, renew_failures,
|
|||||||
def renew_all_lineages(config):
|
def renew_all_lineages(config):
|
||||||
"""Examine each lineage; renew if due and report results"""
|
"""Examine each lineage; renew if due and report results"""
|
||||||
|
|
||||||
if config.domains != []:
|
# This is trivially False if config.domains is empty
|
||||||
|
if any(domain not in config.webroot_map for domain in config.domains):
|
||||||
|
# If more plugins start using cli.add_domains,
|
||||||
|
# we may want to only log a warning here
|
||||||
raise errors.Error("Currently, the renew verb is only capable of "
|
raise errors.Error("Currently, the renew verb is only capable of "
|
||||||
"renewing all installed certificates that are due "
|
"renewing all installed certificates that are due "
|
||||||
"to be renewed; individual domains cannot be "
|
"to be renewed; individual domains cannot be "
|
||||||
|
|||||||
@@ -712,6 +712,12 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
self._test_renew_common(renewalparams=renewalparams,
|
self._test_renew_common(renewalparams=renewalparams,
|
||||||
assert_oc_called=True)
|
assert_oc_called=True)
|
||||||
|
|
||||||
|
def test_renew_with_webroot_map(self):
|
||||||
|
renewalparams = {'authenticator': 'webroot'}
|
||||||
|
self._test_renew_common(
|
||||||
|
renewalparams=renewalparams, assert_oc_called=True,
|
||||||
|
args=['renew', '--webroot-map', '{"example.com": "/tmp"}'])
|
||||||
|
|
||||||
def test_renew_reconstitute_error(self):
|
def test_renew_reconstitute_error(self):
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
with mock.patch('certbot.main.renewal._reconstitute') as mock_reconstitute:
|
with mock.patch('certbot.main.renewal._reconstitute') as mock_reconstitute:
|
||||||
|
|||||||
Reference in New Issue
Block a user