ELBv2:create_target_group: fix template variable typo (#5147)

This commit is contained in:
Adam 2022-05-19 19:35:38 +02:00 committed by GitHub
parent 5d84eec79e
commit 5aace90385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -804,7 +804,7 @@ CREATE_TARGET_GROUP_TEMPLATE = """<CreateTargetGroupResponse xmlns="http://elast
{% if target_group.vpc_id %}
<VpcId>{{ target_group.vpc_id }}</VpcId>
{% endif %}
<HealthCheckProtocol>{{ target_group.health_check_protocol }}</HealthCheckProtocol>
<HealthCheckProtocol>{{ target_group.healthcheck_protocol }}</HealthCheckProtocol>
{% if target_group.healthcheck_port %}<HealthCheckPort>{{ target_group.healthcheck_port }}</HealthCheckPort>{% endif %}
<HealthCheckPath>{{ target_group.healthcheck_path or '' }}</HealthCheckPath>
<HealthCheckIntervalSeconds>{{ target_group.healthcheck_interval_seconds }}</HealthCheckIntervalSeconds>

View File

@ -96,7 +96,9 @@ def test_create_target_group_and_listeners():
UnhealthyThresholdCount=2,
Matcher={"HttpCode": "200"},
)
target_group_arn = response.get("TargetGroups")[0]["TargetGroupArn"]
target_group = response.get("TargetGroups")[0]
target_group_arn = target_group.get("TargetGroupArn")
target_group.get("HealthCheckProtocol").should.equal("HTTP")
# Check it's in the describe_target_groups response
response = conn.describe_target_groups()