fix test_revoke_mutual_exclusive_flags

This commit is contained in:
Brad Warren 2021-04-07 15:28:50 -07:00
parent 9d57a4aa55
commit fecdb242d0
2 changed files with 4 additions and 3 deletions

View file

@ -630,7 +630,7 @@ def test_revoke_mutual_exclusive_flags(context):
'revoke', '--cert-name', cert,
'--cert-path', join(context.config_dir, 'live', cert, 'fullchain.pem')
])
assert 'Exactly one of --cert-path or --cert-name must be specified' in error.value.output
assert 'Exactly one of --cert-path or --cert-name must be specified' in error.value.output
def test_revoke_multiple_lineages(context):

View file

@ -17,7 +17,7 @@ def certbot_test(certbot_args, directory_url, http_01_port, tls_alpn_01_port,
Invoke the certbot executable available in PATH in a test context for the given args.
The test context consists in running certbot in debug mode, with various flags suitable
for tests (eg. no ssl check, customizable ACME challenge ports and config directory ...).
This command captures stdout and returns it to the caller.
This command captures both stdout and stderr and returns it to the caller.
:param list certbot_args: the arguments to pass to the certbot executable
:param str directory_url: URL of the ACME directory server to use
:param int http_01_port: port for the HTTP-01 challenges
@ -31,7 +31,8 @@ def certbot_test(certbot_args, directory_url, http_01_port, tls_alpn_01_port,
command, env = _prepare_args_env(certbot_args, directory_url, http_01_port, tls_alpn_01_port,
config_dir, workspace, force_renew)
return subprocess.check_output(command, universal_newlines=True, cwd=workspace, env=env)
return subprocess.check_output(command, stderr=subprocess.STDOUT,
universal_newlines=True, cwd=workspace, env=env)
def _prepare_environ(workspace):