domain migration
This commit is contained in:
parent
192b810eb4
commit
c04a6ce6fe
26 changed files with 777 additions and 125 deletions
|
|
@ -9,18 +9,18 @@ from app.services.domain_provisioning import (
|
|||
|
||||
|
||||
def test_namecheap_host_strips_zone_suffix():
|
||||
assert namecheap_host("mail.getall.help", "getall.help") == "mail"
|
||||
assert namecheap_host("@", "getall.help") == "@"
|
||||
assert namecheap_host("mail.gentic.email", "gentic.email") == "mail"
|
||||
assert namecheap_host("@", "gentic.email") == "@"
|
||||
assert (
|
||||
namecheap_host("agmail._domainkey.getall.help", "getall.help")
|
||||
namecheap_host("agmail._domainkey.gentic.email", "gentic.email")
|
||||
== "agmail._domainkey"
|
||||
)
|
||||
|
||||
|
||||
def test_build_dns_records_uses_namecheap_hosts_and_ip():
|
||||
records = build_dns_records(
|
||||
"getall.help",
|
||||
"mail.getall.help",
|
||||
"gentic.email",
|
||||
"mail.gentic.email",
|
||||
"agmail",
|
||||
"abc123",
|
||||
mail_server_ip="203.0.113.10",
|
||||
|
|
@ -30,7 +30,7 @@ def test_build_dns_records_uses_namecheap_hosts_and_ip():
|
|||
spf = next(record for record in records if record["purpose"] == "spf")
|
||||
|
||||
assert mx["host"] == "@"
|
||||
assert mx["value"] == "mail.getall.help"
|
||||
assert mx["value"] == "mail.gentic.email"
|
||||
assert mx["priority"] == 10
|
||||
assert a_record["host"] == "mail"
|
||||
assert a_record["value"] == "203.0.113.10"
|
||||
|
|
@ -44,11 +44,11 @@ def test_build_spf_value_supports_ipv6():
|
|||
|
||||
def test_deployment_sections_split_inbound_and_outbound():
|
||||
sections = build_deployment_dns_records(
|
||||
domain_name="getall.help",
|
||||
domain_name="gentic.email",
|
||||
mail_server_ip="203.0.113.10",
|
||||
dkim_selector="agmail",
|
||||
dkim_public_key="test-public-key",
|
||||
app_public_host="email.getall.help",
|
||||
app_public_host="email.gentic.email",
|
||||
)
|
||||
|
||||
inbound_purposes = [record["purpose"] for record in sections["inbound"]]
|
||||
|
|
@ -67,7 +67,7 @@ def test_deployment_sections_split_inbound_and_outbound():
|
|||
dmarc = next(
|
||||
record for record in sections["outbound"] if record["purpose"] == "dmarc"
|
||||
)
|
||||
assert dmarc["value"] == "v=DMARC1; p=quarantine; rua=mailto:dmarc@getall.help"
|
||||
assert dmarc["value"] == "v=DMARC1; p=quarantine; rua=mailto:dmarc@gentic.email"
|
||||
|
||||
dkim = next(
|
||||
record for record in sections["outbound"] if record["purpose"] == "dkim"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue