Started incorporating James' feedback

This commit is contained in:
Brad Warren 2015-08-03 11:38:22 -07:00
parent 993ad48705
commit 428b89e0cf
2 changed files with 13 additions and 17 deletions

View file

@ -8,6 +8,12 @@ import letsencrypt.interfaces
class IPluginProxy(zope.interface.Interface):
"""Wraps a Let's Encrypt plugin"""
http_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTP traffic")
https_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTPS traffic")
def add_parser_arguments(cls, parser):
"""Adds command line arguments needed by the parser"""
@ -27,26 +33,15 @@ class IPluginProxy(zope.interface.Interface):
def load_config():
"""Loads the next config and returns its name"""
class IConfiguratorBaseProxy(IPluginProxy):
"""Common functionality for authenticator/installer tests"""
http_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTP traffic")
https_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTPS traffic")
def get_testable_domain_names():
"""Returns the domain names that can be used in testing"""
class IAuthenticatorProxy(
IConfiguratorBaseProxy, letsencrypt.interfaces.IAuthenticator):
class IAuthenticatorProxy(IPluginProxy, letsencrypt.interfaces.IAuthenticator):
"""Wraps a Let's Encrypt authenticator"""
class IInstallerProxy(
IConfiguratorBaseProxy, letsencrypt.interfaces.IInstaller):
class IInstallerProxy(IPluginProxy, letsencrypt.interfaces.IInstaller):
"""Wraps a Let's Encrypt installer"""
def get_all_names_answer():

View file

@ -41,8 +41,9 @@ def test_authenticator(plugin, config, temp_dir):
achalls = _create_achalls(plugin)
if not achalls:
# Plugin/tests support no common challenge types
return True
logger.error("The plugin and this program support no common "
"challenge types")
return False
try:
responses = plugin.perform(achalls)
@ -208,7 +209,7 @@ def _save_and_restart(plugin, title=None):
def test_rollback(plugin, config, backup):
"""Tests the rollback checkpoints function"""
try:
plugin.rollback_checkpoints(2)
plugin.rollback_checkpoints(1337)
except le_errors.Error as error:
logger.error("Plugin raised an exception during rollback:")
logger.exception(error)
@ -281,7 +282,7 @@ def setup_logging(args):
handler = logging.StreamHandler()
root_logger = logging.getLogger()
root_logger.setLevel(logging.WARNING - args.verbose_count * 10)
root_logger.setLevel(logging.ERROR - args.verbose_count * 10)
root_logger.addHandler(handler)