MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestVerifyDomainMXMissing

Function TestVerifyDomainMXMissing

internal/httpapi/domains_test.go:156–165  ·  view source on GitHub ↗

TestVerifyDomainMXMissing — verification now requires the inbound MX too, not just the ownership TXT, so that inbound_mx.status="verified" (derived from the domain's verified flag) is honest. TXT present but MX missing ⇒ 412, not verified.

(t *testing.T)

Source from the content-addressed store, hash-verified

154// just the ownership TXT, so that inbound_mx.status="verified" (derived from the
155// domain's verified flag) is honest. TXT present but MX missing ⇒ 412, not verified.
156func TestVerifyDomainMXMissing(t *testing.T) {
157 srv := testServer(t)
158 code, body := postJSON(t, srv.URL+"/v1/domains/nomx.com/verify", "good", nil)
159 if code != 412 || body["verified"] != false {
160 t.Fatalf("want 412 not-verified (MX missing), got %d %v", code, body)
161 }
162 if body["mx"] != "missing" {
163 t.Fatalf("expected mx=missing diagnostic in 412 body, got %v", body)
164 }
165}
166
167func TestVerifyDomainSuccess(t *testing.T) {
168 srv := testServer(t)

Callers

nothing calls this directly

Calls 2

testServerFunction · 0.85
postJSONFunction · 0.85

Tested by

no test coverage detected