Add a CAA typed record builder for RFC 8659.
CheckDNS needs this so domain files with CAA records can be reconciled instead of failing the zone check. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -137,6 +137,21 @@ func TestPTRBuilder(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCAABuilder(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
rec, err := godns.CAA("example.test", 3600, 0, "issue", "letsencrypt.org")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if rec.Type != "CAA" {
|
||||
t.Fatalf("type: %q", rec.Type)
|
||||
}
|
||||
if rec.RData != `0 issue "letsencrypt.org"` {
|
||||
t.Fatalf("rdata: %q", rec.RData)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuilderRejectsNonASCIIOwner(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user