fix issue 488
This commit is contained in:
parent
5d421dc343
commit
d273fa15f3
@ -27,3 +27,11 @@ class TooManyTagsError(ELBClientError):
|
|||||||
super(TooManyTagsError, self).__init__(
|
super(TooManyTagsError, self).__init__(
|
||||||
"LoadBalancerNotFound",
|
"LoadBalancerNotFound",
|
||||||
"The quota for the number of tags that can be assigned to a load balancer has been reached")
|
"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")
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from boto.ec2.elb.attributes import (
|
|||||||
)
|
)
|
||||||
from boto.ec2.elb.policies import Policies
|
from boto.ec2.elb.policies import Policies
|
||||||
from moto.core import BaseBackend
|
from moto.core import BaseBackend
|
||||||
from .exceptions import LoadBalancerNotFoundError, TooManyTagsError
|
from .exceptions import LoadBalancerNotFoundError, TooManyTagsError, BadHealthCheckDefinition
|
||||||
|
|
||||||
|
|
||||||
class FakeHealthCheck(object):
|
class FakeHealthCheck(object):
|
||||||
@ -21,6 +21,8 @@ class FakeHealthCheck(object):
|
|||||||
self.unhealthy_threshold = unhealthy_threshold
|
self.unhealthy_threshold = unhealthy_threshold
|
||||||
self.interval = interval
|
self.interval = interval
|
||||||
self.target = target
|
self.target = target
|
||||||
|
if not target.startswith(('HTTP', 'TCP', 'HTTPS', 'SSL')):
|
||||||
|
raise BadHealthCheckDefinition
|
||||||
|
|
||||||
|
|
||||||
class FakeListener(object):
|
class FakeListener(object):
|
||||||
|
Loading…
Reference in New Issue
Block a user