Raise error on duplicate elbv1 listener
AWS returns an error condition when a listener is defined that interferes with an existing listener on the same load balancer port.
This commit is contained in:
parent
7e4a1d0887
commit
98342bfcc3
3 changed files with 24 additions and 0 deletions
|
|
@ -214,6 +214,14 @@ def test_create_and_delete_listener_boto3_support():
|
|||
balancer['ListenerDescriptions'][1]['Listener'][
|
||||
'InstancePort'].should.equal(8443)
|
||||
|
||||
# Creating this listener with an conflicting definition throws error
|
||||
with assert_raises(ClientError):
|
||||
client.create_load_balancer_listeners(
|
||||
LoadBalancerName='my-lb',
|
||||
Listeners=[
|
||||
{'Protocol': 'tcp', 'LoadBalancerPort': 443, 'InstancePort': 1234}]
|
||||
)
|
||||
|
||||
client.delete_load_balancer_listeners(
|
||||
LoadBalancerName='my-lb',
|
||||
LoadBalancerPorts=[443])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue