mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Fixes
This commit is contained in:
parent
a0da6a5025
commit
4443399459
3 changed files with 8 additions and 9 deletions
|
|
@ -152,10 +152,8 @@ jobs:
|
|||
displayName: Retrieve Certbot DNS plugins snaps
|
||||
- script: |
|
||||
python3 -m venv venv
|
||||
venv/Scripts/python tools/pip_install.py -e certbot-ci
|
||||
venv/bin/python tools/pip_install.py -e certbot-ci
|
||||
displayName: Prepare Certbot-CI
|
||||
- script: |
|
||||
python3 -m venv venv
|
||||
venv/Scripts/python tools/pip_install.py -e certbot-ci
|
||||
sudo -E venv/Scripts/python -m pytest certbot-ci/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder $(Build.SourcesDirectory)/snap
|
||||
sudo -E venv/bin/pytest certbot-ci/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder $(Build.SourcesDirectory)/snap
|
||||
displayName: Test DNS plugins snaps
|
||||
|
|
|
|||
|
|
@ -36,5 +36,5 @@ def pytest_generate_tests(metafunc):
|
|||
Generate (multiple) parametrized calls to a test function.
|
||||
"""
|
||||
if "dns_snap_path" in metafunc.fixturenames:
|
||||
snap_dns_path_list = glob.glob(os.path.join(metafunc.config.snap_folder, 'certbot-dns-*_*.snap'))
|
||||
metafunc.parametrize("snap_dns_path", snap_dns_path_list)
|
||||
snap_dns_path_list = glob.glob(os.path.join(metafunc.config.getoption('snap_folder'), 'certbot-dns-*_*.snap'))
|
||||
metafunc.parametrize("dns_snap_path", snap_dns_path_list)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ def install_certbot_snap(request):
|
|||
with pytest.raises(Exception):
|
||||
subprocess.check_call(['certbot', '--version'])
|
||||
try:
|
||||
snap_path = glob.glob(os.path.join(request.config.snap_folder, 'certbot_*.snap'))[0]
|
||||
snap_path = glob.glob(os.path.join(request.config.getoption("snap_folder"),
|
||||
'certbot_*.snap'))[0]
|
||||
subprocess.check_call(['snap', 'install', '--classic', '--dangerous', snap_path])
|
||||
subprocess.check_call(['certbot', '--version'])
|
||||
yield
|
||||
|
|
@ -21,8 +22,8 @@ def install_certbot_snap(request):
|
|||
|
||||
def test_dns_plugin_install(dns_snap_path):
|
||||
"""
|
||||
Test that each DNS plugin Certbot snap available in SNAP_FOLDER
|
||||
can be installed and is usable with the Certbot snap.
|
||||
Test that each DNS plugin Certbot snap can be installed
|
||||
and is usable with the Certbot snap.
|
||||
"""
|
||||
plugin_name = re.match(r'^certbot-(dns-\w+)_.*\.snap$',
|
||||
os.path.basename(dns_snap_path)).group(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue