Disallow creation of ELBs with duplicate names.

This commit is contained in:
Marco Rucci 2016-05-15 20:04:00 +02:00
commit e47fc4cafc
4 changed files with 27 additions and 3 deletions

View file

@ -763,3 +763,12 @@ def test_subnets():
lb['Subnets'][0].should.equal(subnet.id)
lb.should.have.key('VPCId').which.should.equal(vpc.id)
@mock_elb
def test_create_load_balancer_duplicate():
conn = boto.connect_elb()
ports = [(80, 8080, 'http'), (443, 8443, 'tcp')]
conn.create_load_balancer('my-lb', [], ports)
conn.create_load_balancer.when.called_with('my-lb', [], ports).should.throw(BotoServerError)