Add multi-region ELB test.
This commit is contained in:
parent
aa7233a2db
commit
2b775aa075
@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
import boto
|
||||
import boto.ec2.elb
|
||||
from boto.ec2.elb import HealthCheck
|
||||
import sure # noqa
|
||||
|
||||
@ -28,6 +29,21 @@ def test_create_load_balancer():
|
||||
listener2.protocol.should.equal("TCP")
|
||||
|
||||
|
||||
@mock_elb
|
||||
def test_create_elb_in_multiple_region():
|
||||
zones = ['us-east-1a', 'us-east-1b']
|
||||
ports = [(80, 8080, 'http'), (443, 8443, 'tcp')]
|
||||
|
||||
west1_conn = boto.ec2.elb.connect_to_region("us-west-1")
|
||||
west1_conn.create_load_balancer('my-lb', zones, ports)
|
||||
|
||||
west2_conn = boto.ec2.elb.connect_to_region("us-west-2")
|
||||
west2_conn.create_load_balancer('my-lb', zones, ports)
|
||||
|
||||
list(west1_conn.get_all_load_balancers()).should.have.length_of(1)
|
||||
list(west2_conn.get_all_load_balancers()).should.have.length_of(1)
|
||||
|
||||
|
||||
@mock_elb
|
||||
def test_add_listener():
|
||||
conn = boto.connect_elb()
|
||||
|
Loading…
Reference in New Issue
Block a user