mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Merge pull request #545 from letsencrypt/ssl_labs_urls
Add SSLLab URLs at the end of installation
This commit is contained in:
commit
3f2e427a71
2 changed files with 34 additions and 2 deletions
|
|
@ -205,8 +205,22 @@ def success_installation(domains):
|
|||
|
||||
"""
|
||||
util(interfaces.IDisplay).notification(
|
||||
"Congratulations! You have successfully enabled "
|
||||
"%s!" % _gen_https_names(domains), pause=False)
|
||||
"Congratulations! You have successfully enabled {0}!{1}{1}"
|
||||
"You should test your configuration at:{1}{2}".format(
|
||||
_gen_https_names(domains),
|
||||
os.linesep,
|
||||
os.linesep.join(_gen_ssl_lab_urls(domains))),
|
||||
height=(10 + len(domains)),
|
||||
pause=False)
|
||||
|
||||
|
||||
def _gen_ssl_lab_urls(domains):
|
||||
"""Returns a list of urls.
|
||||
|
||||
:param list domains: Each domain is a 'str'
|
||||
|
||||
"""
|
||||
return ["https://www.ssllabs.com/ssltest/analyze.html?d=%s" % dom for dom in domains]
|
||||
|
||||
|
||||
def _gen_https_names(domains):
|
||||
|
|
|
|||
|
|
@ -182,6 +182,24 @@ class ChooseAccountTest(unittest.TestCase):
|
|||
self.assertTrue(self._call([self.acc1, self.acc2]) is None)
|
||||
|
||||
|
||||
class GenSSLLabURLs(unittest.TestCase):
|
||||
"""Loose test of _gen_ssl_lab_urls. URL can change easily in the future."""
|
||||
def setUp(self):
|
||||
zope.component.provideUtility(display_util.FileDisplay(sys.stdout))
|
||||
|
||||
@classmethod
|
||||
def _call(cls, domains):
|
||||
from letsencrypt.display.ops import _gen_ssl_lab_urls
|
||||
return _gen_ssl_lab_urls(domains)
|
||||
|
||||
def test_zero(self):
|
||||
self.assertEqual(self._call([]), [])
|
||||
|
||||
def test_two(self):
|
||||
urls = self._call(["eff.org", "umich.edu"])
|
||||
self.assertTrue("eff.org" in urls[0])
|
||||
self.assertTrue("umich.edu" in urls[1])
|
||||
|
||||
class GenHttpsNamesTest(unittest.TestCase):
|
||||
"""Test _gen_https_names."""
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue