mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 18:04:31 +02:00
route53: re-use boto3 client in wait (#4724)
This change re-uses the boto3 client in the wait method of the route53 authenticator in order to make it more mockable for testing purposes.
This commit is contained in:
@@ -137,9 +137,8 @@ class Authenticator(common.Plugin):
|
|||||||
"""Wait for a change to be propagated to all Route53 DNS servers.
|
"""Wait for a change to be propagated to all Route53 DNS servers.
|
||||||
https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html
|
https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html
|
||||||
"""
|
"""
|
||||||
client = boto3.client("route53")
|
|
||||||
for n in range(0, 120):
|
for n in range(0, 120):
|
||||||
response = client.get_change(Id=change_id)
|
response = self.r53.get_change(Id=change_id)
|
||||||
if response["ChangeInfo"]["Status"] == "INSYNC":
|
if response["ChangeInfo"]["Status"] == "INSYNC":
|
||||||
return
|
return
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|||||||
Reference in New Issue
Block a user