fix issue 488

This commit is contained in:
gilzellner 2015-12-14 15:38:40 +02:00
parent 5d421dc343
commit d273fa15f3
2 changed files with 11 additions and 1 deletions

View File

@ -27,3 +27,11 @@ class TooManyTagsError(ELBClientError):
super(TooManyTagsError, self).__init__(
"LoadBalancerNotFound",
"The quota for the number of tags that can be assigned to a load balancer has been reached")
class BadHealthCheckDefinition(ELBClientError):
def __init__(self):
super(BadHealthCheckDefinition, self).__init__(
"ValidationError",
"HealthCheck Target must begin with one of HTTP, TCP, HTTPS, SSL")

View File

@ -10,7 +10,7 @@ from boto.ec2.elb.attributes import (
)
from boto.ec2.elb.policies import Policies
from moto.core import BaseBackend
from .exceptions import LoadBalancerNotFoundError, TooManyTagsError
from .exceptions import LoadBalancerNotFoundError, TooManyTagsError, BadHealthCheckDefinition
class FakeHealthCheck(object):
@ -21,6 +21,8 @@ class FakeHealthCheck(object):
self.unhealthy_threshold = unhealthy_threshold
self.interval = interval
self.target = target
if not target.startswith(('HTTP', 'TCP', 'HTTPS', 'SSL')):
raise BadHealthCheckDefinition
class FakeListener(object):