Add tests for scheme
This commit is contained in:
parent
e59a0b7fa9
commit
2448c4eced
@ -25,11 +25,12 @@ def test_create_load_balancer():
|
|||||||
|
|
||||||
zones = ['us-east-1a', 'us-east-1b']
|
zones = ['us-east-1a', 'us-east-1b']
|
||||||
ports = [(80, 8080, 'http'), (443, 8443, 'tcp')]
|
ports = [(80, 8080, 'http'), (443, 8443, 'tcp')]
|
||||||
conn.create_load_balancer('my-lb', zones, ports)
|
conn.create_load_balancer('my-lb', zones, ports, scheme='internal')
|
||||||
|
|
||||||
balancers = conn.get_all_load_balancers()
|
balancers = conn.get_all_load_balancers()
|
||||||
balancer = balancers[0]
|
balancer = balancers[0]
|
||||||
balancer.name.should.equal("my-lb")
|
balancer.name.should.equal("my-lb")
|
||||||
|
balancer.scheme.should.equal("internal")
|
||||||
set(balancer.availability_zones).should.equal(set(['us-east-1a', 'us-east-1b']))
|
set(balancer.availability_zones).should.equal(set(['us-east-1a', 'us-east-1b']))
|
||||||
listener1 = balancer.listeners[0]
|
listener1 = balancer.listeners[0]
|
||||||
listener1.load_balancer_port.should.equal(80)
|
listener1.load_balancer_port.should.equal(80)
|
||||||
@ -66,6 +67,7 @@ def test_create_load_balancer_with_certificate():
|
|||||||
balancers = conn.get_all_load_balancers()
|
balancers = conn.get_all_load_balancers()
|
||||||
balancer = balancers[0]
|
balancer = balancers[0]
|
||||||
balancer.name.should.equal("my-lb")
|
balancer.name.should.equal("my-lb")
|
||||||
|
balancer.scheme.should.equal("internet-facing")
|
||||||
set(balancer.availability_zones).should.equal(set(['us-east-1a']))
|
set(balancer.availability_zones).should.equal(set(['us-east-1a']))
|
||||||
listener = balancer.listeners[0]
|
listener = balancer.listeners[0]
|
||||||
listener.load_balancer_port.should.equal(443)
|
listener.load_balancer_port.should.equal(443)
|
||||||
|
Loading…
Reference in New Issue
Block a user