Skip to content
Snippets Groups Projects
Commit 1166978c authored by Hannes Feldt's avatar Hannes Feldt
Browse files

fix

parent f4065cb4
No related branches found
No related tags found
1 merge request!4L2SS-2098: Fix various issues happening during renewal
Pipeline #103873 passed with warnings
Pipeline: Cryptocoryne

#103874

    ...@@ -38,7 +38,9 @@ class DnsClient: ...@@ -38,7 +38,9 @@ class DnsClient:
    """Setup DNS TXT records to verify given domain with given tokens""" """Setup DNS TXT records to verify given domain with given tokens"""
    zone = self.desec_client.get_authoritative_domain(verify_domain) zone = self.desec_client.get_authoritative_domain(verify_domain)
    subname = verify_domain.rsplit(zone["name"], 1)[0].rstrip(".") subname = verify_domain.rsplit(zone["name"], 1)[0].rstrip(".")
    self.desec_client.add_record(zone["name"], "TXT", subname, [f'"{tokens[0]}"']) self.desec_client.add_record(
    zone["name"], "TXT", subname, [f'"{tokens[0]}"'], 3600
    )
    self.cleanups.append( self.cleanups.append(
    lambda d=zone["name"], sn=subname: self.desec_client.delete_record( lambda d=zone["name"], sn=subname: self.desec_client.delete_record(
    d, "TXT", sn d, "TXT", sn
    ......
    ...@@ -40,7 +40,7 @@ class TestDnsClient(TestCase): ...@@ -40,7 +40,7 @@ class TestDnsClient(TestCase):
    "verify.lofar.net" "verify.lofar.net"
    ) )
    desec_client_mock.add_record.assert_called_once_with( desec_client_mock.add_record.assert_called_once_with(
    "lofar.net", "TXT", "verify", ['"token"'] "lofar.net", "TXT", "verify", ['"token"'], 3600
    ) )
    assert len(dns_client.cleanups) == 1 assert len(dns_client.cleanups) == 1
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment