mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 20:02:16 +02:00
@@ -1006,7 +1006,7 @@ def latest_stable_version(get):
|
|||||||
"""Return the latest stable release of letsencrypt."""
|
"""Return the latest stable release of letsencrypt."""
|
||||||
metadata = loads(get(
|
metadata = loads(get(
|
||||||
environ.get('LE_AUTO_JSON_URL',
|
environ.get('LE_AUTO_JSON_URL',
|
||||||
'https://pypi.python.org/pypi/letsencrypt/json')))
|
'https://pypi.python.org/pypi/certbot/json')))
|
||||||
# metadata['info']['version'] actually returns the latest of any kind of
|
# metadata['info']['version'] actually returns the latest of any kind of
|
||||||
# release release, contrary to https://wiki.python.org/moin/PyPIJSON.
|
# release release, contrary to https://wiki.python.org/moin/PyPIJSON.
|
||||||
# The regex is a sufficient regex for picking out prereleases for most
|
# The regex is a sufficient regex for picking out prereleases for most
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ def latest_stable_version(get):
|
|||||||
"""Return the latest stable release of letsencrypt."""
|
"""Return the latest stable release of letsencrypt."""
|
||||||
metadata = loads(get(
|
metadata = loads(get(
|
||||||
environ.get('LE_AUTO_JSON_URL',
|
environ.get('LE_AUTO_JSON_URL',
|
||||||
'https://pypi.python.org/pypi/letsencrypt/json')))
|
'https://pypi.python.org/pypi/certbot/json')))
|
||||||
# metadata['info']['version'] actually returns the latest of any kind of
|
# metadata['info']['version'] actually returns the latest of any kind of
|
||||||
# release release, contrary to https://wiki.python.org/moin/PyPIJSON.
|
# release release, contrary to https://wiki.python.org/moin/PyPIJSON.
|
||||||
# The regex is a sufficient regex for picking out prereleases for most
|
# The regex is a sufficient regex for picking out prereleases for most
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ def run_le_auto(venv_dir, base_url, **kwargs):
|
|||||||
d = dict(XDG_DATA_HOME=venv_dir,
|
d = dict(XDG_DATA_HOME=venv_dir,
|
||||||
# URL to PyPI-style JSON that tell us the latest released version
|
# URL to PyPI-style JSON that tell us the latest released version
|
||||||
# of LE:
|
# of LE:
|
||||||
LE_AUTO_JSON_URL=base_url + 'letsencrypt/json',
|
LE_AUTO_JSON_URL=base_url + 'certbot/json',
|
||||||
# URL to dir containing letsencrypt-auto and letsencrypt-auto.sig:
|
# URL to dir containing letsencrypt-auto and letsencrypt-auto.sig:
|
||||||
LE_AUTO_DIR_TEMPLATE=base_url + '%s/',
|
LE_AUTO_DIR_TEMPLATE=base_url + '%s/',
|
||||||
# The public key corresponding to signing.key:
|
# The public key corresponding to signing.key:
|
||||||
@@ -258,7 +258,7 @@ class AutoTests(TestCase):
|
|||||||
with ephemeral_dir() as venv_dir:
|
with ephemeral_dir() as venv_dir:
|
||||||
# This serves a PyPI page with a higher version, a GitHub-alike
|
# This serves a PyPI page with a higher version, a GitHub-alike
|
||||||
# with a corresponding le-auto script, and a matching signature.
|
# with a corresponding le-auto script, and a matching signature.
|
||||||
resources = {'letsencrypt/json': dumps({'releases': {'99.9.9': None}}),
|
resources = {'certbot/json': dumps({'releases': {'99.9.9': None}}),
|
||||||
'v99.9.9/letsencrypt-auto': NEW_LE_AUTO,
|
'v99.9.9/letsencrypt-auto': NEW_LE_AUTO,
|
||||||
'v99.9.9/letsencrypt-auto.sig': NEW_LE_AUTO_SIG}
|
'v99.9.9/letsencrypt-auto.sig': NEW_LE_AUTO_SIG}
|
||||||
with serving(resources) as base_url:
|
with serving(resources) as base_url:
|
||||||
@@ -301,8 +301,8 @@ class AutoTests(TestCase):
|
|||||||
with ephemeral_dir() as venv_dir:
|
with ephemeral_dir() as venv_dir:
|
||||||
# Serve an unrelated hash signed with the good key (easier than
|
# Serve an unrelated hash signed with the good key (easier than
|
||||||
# making a bad key, and a mismatch is a mismatch):
|
# making a bad key, and a mismatch is a mismatch):
|
||||||
resources = {'': '<a href="letsencrypt/">letsencrypt/</a>',
|
resources = {'': '<a href="certbot/">certbot/</a>',
|
||||||
'letsencrypt/json': dumps({'releases': {'99.9.9': None}}),
|
'certbot/json': dumps({'releases': {'99.9.9': None}}),
|
||||||
'v99.9.9/letsencrypt-auto': build_le_auto(version='99.9.9'),
|
'v99.9.9/letsencrypt-auto': build_le_auto(version='99.9.9'),
|
||||||
'v99.9.9/letsencrypt-auto.sig': signed('something else')}
|
'v99.9.9/letsencrypt-auto.sig': signed('something else')}
|
||||||
with serving(resources) as base_url:
|
with serving(resources) as base_url:
|
||||||
@@ -320,8 +320,8 @@ class AutoTests(TestCase):
|
|||||||
def test_pip_failure(self):
|
def test_pip_failure(self):
|
||||||
"""Make sure pip stops us if there is a hash mismatch."""
|
"""Make sure pip stops us if there is a hash mismatch."""
|
||||||
with ephemeral_dir() as venv_dir:
|
with ephemeral_dir() as venv_dir:
|
||||||
resources = {'': '<a href="letsencrypt/">letsencrypt/</a>',
|
resources = {'': '<a href="certbot/">certbot/</a>',
|
||||||
'letsencrypt/json': dumps({'releases': {'99.9.9': None}})}
|
'certbot/json': dumps({'releases': {'99.9.9': None}})}
|
||||||
with serving(resources) as base_url:
|
with serving(resources) as base_url:
|
||||||
# Build a le-auto script embedding a bad requirements file:
|
# Build a le-auto script embedding a bad requirements file:
|
||||||
install_le_auto(
|
install_le_auto(
|
||||||
|
|||||||
Reference in New Issue
Block a user