mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-25 10:16:34 +00:00
refactor: Temporarily disable CAA records as clients are not ready
This commit is contained in:
parent
8a672bab07
commit
7d9150a77a
|
@ -68,18 +68,20 @@ class ServiceManager(Service):
|
|||
|
||||
dns_records: list[ServiceDnsRecord] = []
|
||||
|
||||
try:
|
||||
dns_records.append(
|
||||
ServiceDnsRecord(
|
||||
type="CAA",
|
||||
name=get_domain(),
|
||||
content=f'128 issue "letsencrypt.org;accounturi={read_account_uri()}"',
|
||||
ttl=3600,
|
||||
display_name="CAA record",
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
logging.error(f"Error creating CAA: {e}")
|
||||
# TODO: Reenable with 3.5.0 release when clients are ready.
|
||||
# Do not forget about tests!
|
||||
# try:
|
||||
# dns_records.append(
|
||||
# ServiceDnsRecord(
|
||||
# type="CAA",
|
||||
# name=get_domain(),
|
||||
# content=f'128 issue "letsencrypt.org;accounturi={read_account_uri()}"',
|
||||
# ttl=3600,
|
||||
# display_name="CAA record",
|
||||
# )
|
||||
# )
|
||||
# except Exception as e:
|
||||
# logging.error(f"Error creating CAA: {e}")
|
||||
|
||||
for service in ServiceManager.get_enabled_services():
|
||||
dns_records += service.get_dns_records(ip4, ip6)
|
||||
|
|
|
@ -394,15 +394,16 @@ def test_graphql_get_domain(
|
|||
ttl=18000,
|
||||
),
|
||||
)
|
||||
assert is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="test-domain.tld",
|
||||
record_type="CAA",
|
||||
content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
ttl=3600,
|
||||
),
|
||||
)
|
||||
# TODO: Reenable with 3.5.0 release when clients are ready.
|
||||
# assert is_dns_record_in_array(
|
||||
# dns_records,
|
||||
# dns_record(
|
||||
# name="test-domain.tld",
|
||||
# record_type="CAA",
|
||||
# content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
# ttl=3600,
|
||||
# ),
|
||||
# )
|
||||
|
||||
|
||||
def test_dns_records_no_duplicates(
|
||||
|
@ -546,15 +547,16 @@ def test_graphql_get_domain_no_uri_account_file(
|
|||
ttl=18000,
|
||||
),
|
||||
)
|
||||
assert not is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="test-domain.tld",
|
||||
record_type="CAA",
|
||||
content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
ttl=3600,
|
||||
),
|
||||
)
|
||||
# TODO: Reenable with 3.5.0 release when clients are ready.
|
||||
# assert not is_dns_record_in_array(
|
||||
# dns_records,
|
||||
# dns_record(
|
||||
# name="test-domain.tld",
|
||||
# record_type="CAA",
|
||||
# content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
# ttl=3600,
|
||||
# ),
|
||||
# )
|
||||
|
||||
|
||||
def test_graphql_get_domain_not_found_account_file(
|
||||
|
@ -645,15 +647,16 @@ def test_graphql_get_domain_not_found_account_file(
|
|||
ttl=18000,
|
||||
),
|
||||
)
|
||||
assert not is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="test-domain.tld",
|
||||
record_type="CAA",
|
||||
content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
ttl=3600,
|
||||
),
|
||||
)
|
||||
# TODO: Reenable with 3.5.0 release when clients are ready.
|
||||
# assert not is_dns_record_in_array(
|
||||
# dns_records,
|
||||
# dns_record(
|
||||
# name="test-domain.tld",
|
||||
# record_type="CAA",
|
||||
# content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
# ttl=3600,
|
||||
# ),
|
||||
# )
|
||||
|
||||
|
||||
def test_graphql_get_domain_black_account_file(
|
||||
|
@ -744,15 +747,16 @@ def test_graphql_get_domain_black_account_file(
|
|||
ttl=18000,
|
||||
),
|
||||
)
|
||||
assert not is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="test-domain.tld",
|
||||
record_type="CAA",
|
||||
content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
ttl=3600,
|
||||
),
|
||||
)
|
||||
# TODO: Reenable with 3.5.0 release when clients are ready.
|
||||
# assert not is_dns_record_in_array(
|
||||
# dns_records,
|
||||
# dns_record(
|
||||
# name="test-domain.tld",
|
||||
# record_type="CAA",
|
||||
# content='128 issue "letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/234340396"',
|
||||
# ttl=3600,
|
||||
# ),
|
||||
# )
|
||||
|
||||
|
||||
API_GET_TIMEZONE = """
|
||||
|
|
Loading…
Reference in a new issue