Skip to content

Commit

Permalink
Route53: add CallerReference to the response of two more operations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
giograno authored Dec 5, 2023
1 parent ff5256d commit 167d4af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions moto/route53/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) ->
<HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<ResourceRecordSetCount>{{ zone.rrsets|count }}</ResourceRecordSetCount>
<Config>
{% if zone.comment %}
Expand Down Expand Up @@ -689,6 +690,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) ->
<HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<Config>
{% if zone.comment %}
<Comment>{{ zone.comment }}</Comment>
Expand All @@ -711,6 +713,7 @@ def reusable_delegation_set(self, request: Any, full_url: str, headers: Any) ->
<HostedZone>
<Id>/hostedzone/{{ zone.id }}</Id>
<Name>{{ zone.name }}</Name>
<CallerReference>{{ zone.caller_reference }}</CallerReference>
<Config>
{% if zone.comment %}
<Comment>{{ zone.comment }}</Comment>
Expand Down
4 changes: 4 additions & 0 deletions tests/test_route53/test_route53.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,13 @@ def test_list_hosted_zones_by_dns_name():
zones = conn.list_hosted_zones_by_name()
assert len(zones["HostedZones"]) == 4
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]["CallerReference"] == str(hash("baz"))
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]["CallerReference"] == str(hash("bar"))


@mock_route53
Expand Down

0 comments on commit 167d4af

Please sign in to comment.