mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
Use os.path.normcase to have Windows compatible challenge paths on Windows (#8599)
* Use os.path.normcase to have Windows compatible challenge paths on Windows. * Add integration test and fix lint
This commit is contained in:
@@ -148,6 +148,17 @@ def test_certonly(context):
|
|||||||
"""Test the certonly verb on certbot."""
|
"""Test the certonly verb on certbot."""
|
||||||
context.certbot(['certonly', '--cert-name', 'newname', '-d', context.get_domain('newname')])
|
context.certbot(['certonly', '--cert-name', 'newname', '-d', context.get_domain('newname')])
|
||||||
|
|
||||||
|
assert_cert_count_for_lineage(context.config_dir, 'newname', 1)
|
||||||
|
|
||||||
|
|
||||||
|
def test_certonly_webroot(context):
|
||||||
|
"""Test the certonly verb with webroot plugin"""
|
||||||
|
with misc.create_http_server(context.http_01_port) as webroot:
|
||||||
|
certname = context.get_domain('webroot')
|
||||||
|
context.certbot(['certonly', '-a', 'webroot', '--webroot-path', webroot, '-d', certname])
|
||||||
|
|
||||||
|
assert_cert_count_for_lineage(context.config_dir, certname, 1)
|
||||||
|
|
||||||
|
|
||||||
def test_auth_and_install_with_csr(context):
|
def test_auth_and_install_with_csr(context):
|
||||||
"""Test certificate issuance and install using an existing CSR."""
|
"""Test certificate issuance and install using an existing CSR."""
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ to serve all files under specified web root ({0})."""
|
|||||||
"--webroot-path and --domains, or --webroot-map. Run with "
|
"--webroot-path and --domains, or --webroot-map. Run with "
|
||||||
" --help webroot for examples.")
|
" --help webroot for examples.")
|
||||||
for name, path in path_map.items():
|
for name, path in path_map.items():
|
||||||
self.full_roots[name] = os.path.join(path, challenges.HTTP01.URI_ROOT_PATH)
|
self.full_roots[name] = os.path.join(path, os.path.normcase(
|
||||||
|
challenges.HTTP01.URI_ROOT_PATH))
|
||||||
logger.debug("Creating root challenges validation dir at %s",
|
logger.debug("Creating root challenges validation dir at %s",
|
||||||
self.full_roots[name])
|
self.full_roots[name])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user