From d056c0af8b6a027fca73e5a5613a9d69112e10d5 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Wed, 7 Apr 2021 15:28:50 -0700 Subject: [PATCH] fix test_revoke_mutual_exclusive_flags --- .../certbot_integration_tests/certbot_tests/test_main.py | 2 +- certbot-ci/certbot_integration_tests/utils/certbot_call.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py index 74f7e12fe..f0f80b85b 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -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): diff --git a/certbot-ci/certbot_integration_tests/utils/certbot_call.py b/certbot-ci/certbot_integration_tests/utils/certbot_call.py index 965ab6881..919deeb7e 100755 --- a/certbot-ci/certbot_integration_tests/utils/certbot_call.py +++ b/certbot-ci/certbot_integration_tests/utils/certbot_call.py @@ -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):