mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 06:15:36 -04:00
Merge pull request #983 from letsencrypt/renewal_status_quick
Quick renewal status fix
This commit is contained in:
commit
3fd7cd6587
2 changed files with 12 additions and 4 deletions
|
|
@ -301,6 +301,12 @@ def _auth_from_domains(le_client, config, domains, plugins):
|
|||
raise errors.Error("Certificate could not be obtained")
|
||||
|
||||
_report_new_cert(lineage.cert)
|
||||
reporter_util = zope.component.getUtility(interfaces.IReporter)
|
||||
reporter_util.add_message(
|
||||
"Your certificate will expire on {0}. To obtain a new version of the "
|
||||
"certificate in the future, simply run this client again.".format(
|
||||
lineage.notafter().date()),
|
||||
reporter_util.MEDIUM_PRIORITY)
|
||||
|
||||
return lineage
|
||||
|
||||
|
|
|
|||
|
|
@ -128,8 +128,9 @@ class CLITest(unittest.TestCase):
|
|||
self._auth_new_request_common(mock_client)
|
||||
self.assertEqual(
|
||||
mock_client.obtain_and_enroll_certificate.call_count, 1)
|
||||
self.assertTrue(
|
||||
cert_path in mock_get_utility().add_message.call_args[0][0])
|
||||
msg = mock_get_utility().add_message.call_args_list[0][0][0]
|
||||
self.assertTrue(cert_path in msg)
|
||||
self.assertEqual(mock_get_utility().add_message.call_count, 2)
|
||||
|
||||
def test_auth_new_request_failure(self):
|
||||
mock_client = mock.MagicMock()
|
||||
|
|
@ -164,8 +165,9 @@ class CLITest(unittest.TestCase):
|
|||
self.assertEqual(mock_lineage.save_successor.call_count, 1)
|
||||
mock_lineage.update_all_links_to.assert_called_once_with(
|
||||
mock_lineage.latest_common_version())
|
||||
self.assertTrue(
|
||||
cert_path in mock_get_utility().add_message.call_args[0][0])
|
||||
msg = mock_get_utility().add_message.call_args_list[0][0][0]
|
||||
self.assertTrue(cert_path in msg)
|
||||
self.assertEqual(mock_get_utility().add_message.call_count, 2)
|
||||
|
||||
@mock.patch('letsencrypt.cli.display_ops.pick_installer')
|
||||
@mock.patch('letsencrypt.cli.zope.component.getUtility')
|
||||
|
|
|
|||
Loading…
Reference in a new issue