mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Rework config utility
This commit is contained in:
@@ -8,6 +8,8 @@ import zope.component
|
|||||||
|
|
||||||
from acme import jose
|
from acme import jose
|
||||||
|
|
||||||
|
from letsencrypt import configuration
|
||||||
|
|
||||||
from letsencrypt.tests import test_util
|
from letsencrypt.tests import test_util
|
||||||
|
|
||||||
from letsencrypt.plugins import common
|
from letsencrypt.plugins import common
|
||||||
@@ -56,18 +58,17 @@ def get_nginx_configurator(
|
|||||||
backup_dir=backups,
|
backup_dir=backups,
|
||||||
temp_checkpoint_dir=os.path.join(work_dir, "temp_checkpoints"),
|
temp_checkpoint_dir=os.path.join(work_dir, "temp_checkpoints"),
|
||||||
in_progress_dir=os.path.join(backups, "IN_PROGRESS"),
|
in_progress_dir=os.path.join(backups, "IN_PROGRESS"),
|
||||||
|
server="https://acme-server.org:443/new",
|
||||||
dvsni_port=5001,
|
dvsni_port=5001,
|
||||||
),
|
),
|
||||||
name="nginx",
|
name="nginx",
|
||||||
version=version)
|
version=version)
|
||||||
config.prepare()
|
config.prepare()
|
||||||
# also make a general client config for good measure...
|
|
||||||
namespace = mock.MagicMock(
|
# Provide general config utility.
|
||||||
config_dir='/tmp/config', work_dir='/tmp/foo', foo='bar',
|
nsconfig = configuration.NamespaceConfig(config.config)
|
||||||
server='https://acme-server.org:443/new')
|
|
||||||
from letsencrypt.configuration import NamespaceConfig
|
|
||||||
nsconfig = NamespaceConfig(namespace)
|
|
||||||
zope.component.provideUtility(nsconfig)
|
zope.component.provideUtility(nsconfig)
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user