Fix IsDefault bug in elbv2 describe_rules (#4204)
This commit is contained in:
parent
b9c7ec383c
commit
25e79c6e67
@ -965,7 +965,7 @@ DESCRIBE_RULES_TEMPLATE = """<DescribeRulesResponse xmlns="http://elasticloadbal
|
||||
<Rules>
|
||||
{% for rule in rules %}
|
||||
<member>
|
||||
<IsDefault>{{ "true" if rules.is_default else "false" }}</IsDefault>
|
||||
<IsDefault>{{ "true" if rule.is_default else "false" }}</IsDefault>
|
||||
<Conditions>
|
||||
{% for condition in rule.conditions %}
|
||||
<member>
|
||||
|
@ -1166,6 +1166,9 @@ def test_handle_listener_rules():
|
||||
first_rule = obtained_rules["Rules"][0]
|
||||
second_rule = obtained_rules["Rules"][1]
|
||||
third_rule = obtained_rules["Rules"][2]
|
||||
default_rule = obtained_rules["Rules"][3]
|
||||
first_rule["IsDefault"].should.equal(False)
|
||||
default_rule["IsDefault"].should.equal(True)
|
||||
obtained_rules = conn.describe_rules(RuleArns=[first_rule["RuleArn"]])
|
||||
obtained_rules["Rules"].should.equal([first_rule])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user