From 25948ebe14f173212e3eec5a670ff2f4e797fa17 Mon Sep 17 00:00:00 2001 From: Eric Stonfer Date: Mon, 25 Jun 2012 16:36:21 -0400 Subject: [PATCH] fixes elb test in mocking mode --- lib/fog/aws/requests/elb/create_load_balancer.rb | 2 +- tests/aws/requests/elb/helper.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fog/aws/requests/elb/create_load_balancer.rb b/lib/fog/aws/requests/elb/create_load_balancer.rb index 0001b8904..b18f55941 100644 --- a/lib/fog/aws/requests/elb/create_load_balancer.rb +++ b/lib/fog/aws/requests/elb/create_load_balancer.rb @@ -76,7 +76,7 @@ module Fog self.data[:load_balancers][lb_name] = { 'AvailabilityZones' => availability_zones, 'Subnets' => options[:subnet_ids], - 'Scheme' => options[:scheme], + 'Scheme' => options[:scheme].nil? ? 'internet-facing' : options[:scheme], 'SecurityGroups' => options[:security_groups], 'CanonicalHostedZoneName' => '', 'CanonicalHostedZoneNameID' => '', diff --git a/tests/aws/requests/elb/helper.rb b/tests/aws/requests/elb/helper.rb index c813edda1..178372440 100644 --- a/tests/aws/requests/elb/helper.rb +++ b/tests/aws/requests/elb/helper.rb @@ -17,8 +17,10 @@ class AWS "ListenerDescriptions" => Array, "LoadBalancerName" => String, "Policies" => {"LBCookieStickinessPolicies" => Array, "AppCookieStickinessPolicies" => Array}, + "Scheme" => String, + "SecurityGroups" => Fog::Nullable::String, "SourceSecurityGroup" => {"GroupName" => String, "OwnerAlias" => String}, - "Scheme" => String + "Subnets" => Fog::Nullable::String } CREATE_LOAD_BALANCER = BASIC.merge({