Check only for nginx installation in lock_test to decide to do the test

This commit is contained in:
Adrien Ferrand 2020-07-01 23:16:40 +02:00
parent a9e2692237
commit ed331d16ab

View file

@ -59,9 +59,9 @@ def set_up():
command = set_up_command(config_dir, logs_dir, work_dir, nginx_dir)
dirs = [logs_dir, config_dir, work_dir]
# A specific environment variable for Azure Pipelines is SYSTEM_TEAMFOUNDATIONSERVERURI.
# If set, then we know we are on a CI job, and we test Nginx's lock.
if os.environ.get('SYSTEM_TEAMFOUNDATIONSERVERURI') == 'true' or util.exe_exists('nginx'):
# If Nginx is installed, do the test, otherwise skip it.
# Issue https://github.com/certbot/certbot/issues/8121 tracks the work to remove this control.
if util.exe_exists('nginx'):
dirs.append(nginx_dir)
else:
logger.warning('Skipping Nginx lock tests')