Route53: add CallerReference to the response of two more operations (#7097)

This commit is contained in:
Giovanni Grano 2023-12-05 21:56:07 +01:00 committed by GitHub
parent ff5256d8e5
commit 167d4afde8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -660,6 +660,7 @@ CREATE_HOSTED_ZONE_RESPONSE = """<CreateHostedZoneResponse xmlns="https://route5
<HostedZone> <HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id> <Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name> <Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<ResourceRecordSetCount>{{ zone.rrsets|count }}</ResourceRecordSetCount> <ResourceRecordSetCount>{{ zone.rrsets|count }}</ResourceRecordSetCount>
<Config> <Config>
{% if zone.comment %} {% if zone.comment %}
@ -689,6 +690,7 @@ LIST_HOSTED_ZONES_RESPONSE = """<ListHostedZonesResponse xmlns="https://route53.
<HostedZone> <HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id> <Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name> <Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<Config> <Config>
{% if zone.comment %} {% if zone.comment %}
<Comment>{{ zone.comment }}</Comment> <Comment>{{ zone.comment }}</Comment>
@ -711,6 +713,7 @@ LIST_HOSTED_ZONES_BY_NAME_RESPONSE = """<ListHostedZonesByNameResponse xmlns="{{
<HostedZone> <HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id> <Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name> <Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<Config> <Config>
{% if zone.comment %} {% if zone.comment %}
<Comment>{{ zone.comment }}</Comment> <Comment>{{ zone.comment }}</Comment>

View File

@ -594,9 +594,13 @@ def test_list_hosted_zones_by_dns_name():
zones = conn.list_hosted_zones_by_name() zones = conn.list_hosted_zones_by_name()
assert len(zones["HostedZones"]) == 4 assert len(zones["HostedZones"]) == 4
assert zones["HostedZones"][0]["Name"] == "test.b.com." assert zones["HostedZones"][0]["Name"] == "test.b.com."
assert zones["HostedZones"][0]["CallerReference"] == str(hash("foo"))
assert zones["HostedZones"][1]["Name"] == "my.test.net." assert zones["HostedZones"][1]["Name"] == "my.test.net."
assert zones["HostedZones"][1]["CallerReference"] == str(hash("baz"))
assert zones["HostedZones"][2]["Name"] == "test.a.org." assert zones["HostedZones"][2]["Name"] == "test.a.org."
assert zones["HostedZones"][2]["CallerReference"] == str(hash("bar"))
assert zones["HostedZones"][3]["Name"] == "test.a.org." assert zones["HostedZones"][3]["Name"] == "test.a.org."
assert zones["HostedZones"][3]["CallerReference"] == str(hash("bar"))
@mock_route53 @mock_route53