mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|elb] add test to verify that ListenerDescriptions work when creating an ELB
This commit is contained in:
parent
843cbc37ac
commit
b0473e2725
1 changed files with 17 additions and 0 deletions
|
@ -49,6 +49,23 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
|
|||
tests("availability zones are correct").returns(azs) { elb2.availability_zones }
|
||||
elb2.destroy
|
||||
end
|
||||
|
||||
tests('with ListenerDescriptions') do
|
||||
listeners = [{
|
||||
'Listener' => {'LoadBalancerPort' => 2030, 'InstancePort' => 2030, 'Protocol' => 'HTTP'},
|
||||
'PolicyNames' => []
|
||||
}, {
|
||||
'Listener' => {'LoadBalancerPort' => 443, 'InstancePort' => 443, 'Protocol' => 'HTTPS'},
|
||||
'PolicyNames' => []
|
||||
}]
|
||||
elb3 = AWS[:elb].load_balancers.create(:id => "#{elb_id}-3", 'ListenerDescriptions' => listeners)
|
||||
tests('there are 2 listeners').returns(2) { elb3.listeners.count }
|
||||
tests('instance_port is 2030').returns(2030) { elb3.listeners.first.instance_port }
|
||||
tests('lb_port is 2030').returns(2030) { elb3.listeners.first.lb_port }
|
||||
tests('protocol is HTTP').returns('HTTP') { elb3.listeners.first.protocol }
|
||||
tests('protocol is HTTPS').returns('HTTPS') { elb3.listeners.last.protocol }
|
||||
elb3.destroy
|
||||
end
|
||||
end
|
||||
|
||||
tests('all') do
|
||||
|
|
Loading…
Reference in a new issue