adding tests
This commit is contained in:
parent
c8d8f00241
commit
fc30f5ba1f
4 changed files with 93 additions and 3 deletions
|
|
@ -91,11 +91,10 @@ class ELBBackend(BaseBackend):
|
|||
if balancer:
|
||||
for lb_port in ports:
|
||||
for listener in balancer.listeners:
|
||||
if lb_port == listener.load_balancer_port:
|
||||
if int(lb_port) == int(listener.load_balancer_port):
|
||||
continue
|
||||
else:
|
||||
listeners.append(listener)
|
||||
|
||||
balancer.listeners = listeners
|
||||
return balancer
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,13 @@ class ELBResponse(BaseResponse):
|
|||
port_index = 1
|
||||
while True:
|
||||
try:
|
||||
ports.append(self.querystring['Listeners.member.{0}.LoadBalancerPort'.format(port_index)][0])
|
||||
port = self.querystring['LoadBalancerPorts.member.{0}'.format(port_index)][0]
|
||||
except KeyError:
|
||||
break
|
||||
|
||||
port_index += 1
|
||||
ports.append(int(port))
|
||||
|
||||
elb_backend.delete_load_balancer_listeners(load_balancer_name, ports)
|
||||
template = Template(DELETE_LOAD_BALANCER_LISTENERS)
|
||||
return template.render()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue