From cf63470db975ae8be582d90ec7d4942b79f1b68d Mon Sep 17 00:00:00 2001 From: Alex Zorin Date: Tue, 31 May 2022 17:02:43 +1000 Subject: [PATCH 1/2] certbot-ci: improve tests for update_account/show_account --- .../certbot_integration_tests/certbot_tests/test_main.py | 5 +++++ 1 file changed, 5 insertions(+) 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 2827ae939..c9eca39d6 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -78,7 +78,12 @@ def test_registration_override(context: IntegrationTestsContext) -> None: context.certbot(['register', '--email', 'ex1@domain.org,ex2@domain.org']) context.certbot(['update_account', '--email', 'example@domain.org']) + stdout, _ = context.certbot(['show_account']) + assert 'example@domain.org' in stdout, "New email should be present" context.certbot(['update_account', '--email', 'ex1@domain.org,ex2@domain.org']) + stdout, _ = context.certbot(['show_account']) + assert 'example@domain.org' not in stdout, "Old email should not be present" + assert 'ex1@domain.org, ex2@domain.org' in stdout, "New emails should be present" def test_prepare_plugins(context: IntegrationTestsContext) -> None: From 7758a03b5b3547fc28ddf20ca1857ac80533fc41 Mon Sep 17 00:00:00 2001 From: Alex Zorin Date: Tue, 31 May 2022 17:31:52 +1000 Subject: [PATCH 2/2] skip boulder for show_account assertions --- .../certbot_tests/test_main.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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 c9eca39d6..7bef646be 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -78,12 +78,15 @@ def test_registration_override(context: IntegrationTestsContext) -> None: context.certbot(['register', '--email', 'ex1@domain.org,ex2@domain.org']) context.certbot(['update_account', '--email', 'example@domain.org']) - stdout, _ = context.certbot(['show_account']) - assert 'example@domain.org' in stdout, "New email should be present" + stdout1, _ = context.certbot(['show_account']) context.certbot(['update_account', '--email', 'ex1@domain.org,ex2@domain.org']) - stdout, _ = context.certbot(['show_account']) - assert 'example@domain.org' not in stdout, "Old email should not be present" - assert 'ex1@domain.org, ex2@domain.org' in stdout, "New emails should be present" + stdout2, _ = context.certbot(['show_account']) + + # https://github.com/letsencrypt/boulder/issues/6144 + if context.acme_server != 'boulder-v2': + assert 'example@domain.org' in stdout1, "New email should be present" + assert 'example@domain.org' not in stdout2, "Old email should not be present" + assert 'ex1@domain.org, ex2@domain.org' in stdout2, "New emails should be present" def test_prepare_plugins(context: IntegrationTestsContext) -> None: