1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|elb] Fix use of describe_load_balancers in tests.

This commit is contained in:
Dan Peterson 2012-04-22 22:51:14 -03:00
parent 169f5e754c
commit 268bb5ad89
2 changed files with 3 additions and 3 deletions

View file

@ -191,7 +191,7 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
# create a load balancer
@elb_connection.create_load_balancer(["us-east-1a"], "fog", [{"Protocol" => "HTTP", "LoadBalancerPort" => "80", "InstancePort" => "80"}])
elb_response = @elb_connection.describe_load_balancers("fog")
elb_response = @elb_connection.describe_load_balancers("LoadBalancerNames" => "fog")
elb = elb_response.body["DescribeLoadBalancersResult"]["LoadBalancerDescriptions"].first
hosted_zone_id = elb["CanonicalHostedZoneNameID"]
dns_name = elb["DNSName"]

View file

@ -16,7 +16,7 @@ Shindo.tests('AWS::ELB | load_balancer_tests', ['aws', 'elb']) do
end
tests('#describe_load_balancers with bad lb') do
raises(Fog::AWS::ELB::NotFound) { Fog::AWS[:elb].describe_load_balancers('none-such-lb') }
raises(Fog::AWS::ELB::NotFound) { Fog::AWS[:elb].describe_load_balancers('LoadBalancerNames' => 'none-such-lb') }
end
tests("#describe_load_balancers with SSL listener") do
@ -25,7 +25,7 @@ Shindo.tests('AWS::ELB | load_balancer_tests', ['aws', 'elb']) do
{'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
]
Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners)
response = Fog::AWS[:elb].describe_load_balancers(@load_balancer_id).body
response = Fog::AWS[:elb].describe_load_balancers('LoadBalancerNames' => @load_balancer_id).body
tests("SSLCertificateId is set").returns(@certificate['Arn']) do
listeners = response["DescribeLoadBalancersResult"]["LoadBalancerDescriptions"].first["ListenerDescriptions"]
listeners.find {|l| l["Listener"]["Protocol"] == 'HTTPS' }["Listener"]["SSLCertificateId"]