mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Ensure config_dir, work_dir, and logs_dir have absolute paths
This commit is contained in:
parent
1dd1523680
commit
778b8797bb
2 changed files with 8 additions and 0 deletions
|
|
@ -37,6 +37,11 @@ class NamespaceConfig(object):
|
|||
|
||||
def __init__(self, namespace):
|
||||
self.namespace = namespace
|
||||
|
||||
self.namespace.config_dir = os.path.abspath(self.namespace.config_dir)
|
||||
self.namespace.work_dir = os.path.abspath(self.namespace.work_dir)
|
||||
self.namespace.logs_dir = os.path.abspath(self.namespace.logs_dir)
|
||||
|
||||
# Check command line parameters sanity, and error out in case of problem.
|
||||
check_config_sanity(self)
|
||||
|
||||
|
|
|
|||
|
|
@ -692,6 +692,9 @@ class RenewableCertTests(BaseRenewableCertTest):
|
|||
self.test_rc.configfile["renewalparams"]["http01_port"] = "1234"
|
||||
self.test_rc.configfile["renewalparams"]["account"] = "abcde"
|
||||
self.test_rc.configfile["renewalparams"]["domains"] = ["example.com"]
|
||||
self.test_rc.configfile["renewalparams"]["config_dir"] = "config"
|
||||
self.test_rc.configfile["renewalparams"]["work_dir"] = "work"
|
||||
self.test_rc.configfile["renewalparams"]["logs_dir"] = "logs"
|
||||
mock_auth = mock.MagicMock()
|
||||
mock_pd.PluginsRegistry.find_all.return_value = {"apache": mock_auth}
|
||||
# Fails because "fake" != "apache"
|
||||
|
|
|
|||
Loading…
Reference in a new issue