Port another test

This commit is contained in:
Peter Eckersley
2016-02-08 20:30:48 -08:00
parent b2de2cd181
commit 28c5447653
2 changed files with 6 additions and 6 deletions
+1 -2
View File
@@ -686,8 +686,7 @@ def obtain_cert(config, plugins, lineage=None):
# installers are used in auth mode to determine domain names
installer, authenticator = choose_configurator_plugins(config, plugins, "certonly")
except errors.PluginSelectionError as e:
logger.info(
"Could not choose appropriate plugin: %s", e)
logger.info("Could not choose appropriate plugin: %s", e)
raise
# TODO: Handle errors from _init_le_client?
+5 -4
View File
@@ -329,10 +329,11 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
ret, _, _, _ = self._call(['-d', 'foo.bar', 'certonly', '--csr', CSR])
self.assertEqual(ret, '--domains and --csr are mutually exclusive')
# ret, _, _, _ = self._call(['-a', 'bad_auth', 'certonly'])
self.assertRaises(errors.PluginSelectionError, self._call,
['-a', 'bad_auth', 'certonly'])
# self.assertEqual(ret, 'The requested bad_auth plugin does not appear to be installed')
try:
self._call(['-a', 'bad_auth', 'certonly'])
assert False, "Exception should have been raised"
except errors.PluginSelectionError as e:
self.assertTrue('The requested bad_auth plugin does not appear' in e.message)
def test_check_config_sanity_domain(self):
# Punycode