1
0
Fork 0
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:
Blake Gentry 2011-07-15 17:22:34 -07:00
parent 843cbc37ac
commit b0473e2725

View file

@ -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