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

[AWS|ELB] fix PolicyTypeNotFound error in create_load_balancer_policy mock

This commit is contained in:
Michael Hale 2013-08-01 16:34:32 -04:00
parent db5d9f0813
commit 8ae33f1a2e

View file

@ -47,7 +47,7 @@ module Fog
def create_load_balancer_policy(lb_name, name, type_name, attributes = {}) def create_load_balancer_policy(lb_name, name, type_name, attributes = {})
if load_balancer = self.data[:load_balancers][lb_name] if load_balancer = self.data[:load_balancers][lb_name]
raise Fog::AWS::ELB::DuplicatePolicyName, name if policy = load_balancer['Policies']['Proper'].find { |p| p['PolicyName'] == name } raise Fog::AWS::ELB::DuplicatePolicyName, name if policy = load_balancer['Policies']['Proper'].find { |p| p['PolicyName'] == name }
raise Fog::AWS::ELB::PolicyTypeNotFound, policy_type unless policy_type = self.data[:policy_types].find { |pt| pt['PolicyTypeName'] == type_name } raise Fog::AWS::ELB::PolicyTypeNotFound, type_name unless policy_type = self.data[:policy_types].find { |pt| pt['PolicyTypeName'] == type_name }
response = Excon::Response.new response = Excon::Response.new