mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
remove unhelpful question about servernames and default vhosts
This commit is contained in:
parent
2434b4a549
commit
875b94d45a
2 changed files with 1 additions and 20 deletions
|
|
@ -103,18 +103,7 @@ def choose_names(installer):
|
|||
names = get_valid_domains(domains)
|
||||
|
||||
if not names:
|
||||
manual = z_util(interfaces.IDisplay).yesno(
|
||||
"No names were found in your configuration files.{0}You should "
|
||||
"specify ServerNames in your config files in order to allow for "
|
||||
"accurate installation of your certificate.{0}"
|
||||
"If you do use the default vhost, you may specify the name "
|
||||
"manually. Would you like to continue?{0}".format(os.linesep),
|
||||
default=True)
|
||||
|
||||
if manual:
|
||||
return _choose_names_manually()
|
||||
else:
|
||||
return []
|
||||
return _choose_names_manually()
|
||||
|
||||
code, names = _filter_names(names)
|
||||
if code == display_util.OK and names:
|
||||
|
|
|
|||
|
|
@ -206,7 +206,6 @@ class ChooseNamesTest(unittest.TestCase):
|
|||
@mock.patch("certbot.display.ops.z_util")
|
||||
def test_no_names_choose(self, mock_util):
|
||||
self.mock_install().get_all_names.return_value = set()
|
||||
mock_util().yesno.return_value = True
|
||||
domain = "example.com"
|
||||
mock_util().input.return_value = (display_util.OK, domain)
|
||||
|
||||
|
|
@ -214,13 +213,6 @@ class ChooseNamesTest(unittest.TestCase):
|
|||
self.assertEqual(mock_util().input.call_count, 1)
|
||||
self.assertEqual(actual_doms, [domain])
|
||||
|
||||
@mock.patch("certbot.display.ops.z_util")
|
||||
def test_no_names_quit(self, mock_util):
|
||||
self.mock_install().get_all_names.return_value = set()
|
||||
mock_util().yesno.return_value = False
|
||||
|
||||
self.assertEqual(self._call(self.mock_install), [])
|
||||
|
||||
@mock.patch("certbot.display.ops.z_util")
|
||||
def test_filter_names_valid_return(self, mock_util):
|
||||
self.mock_install.get_all_names.return_value = set(["example.com"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue