mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Add CAA support (#161)
* Added CAA support * Fixed bind parsing of CAA records * Added CAA parsing test * Renamed CAA json fields * Added CAA tag validation * Updated CAA docs to clarify on the value field * parse_tests: Fixed typo in caaflags * Added integration test * Small cleanups
This commit is contained in:
@@ -36,4 +36,19 @@ func TestRR(t *testing.T) {
|
||||
if found != expected {
|
||||
t.Errorf("RR expected (%#v) got (%#v)\n", expected, found)
|
||||
}
|
||||
|
||||
experiment = RecordConfig{
|
||||
Type: "CAA",
|
||||
Name: "@",
|
||||
Target: "mailto:test@example.com",
|
||||
TTL: 300,
|
||||
NameFQDN: "example.com",
|
||||
CaaTag: "iodef",
|
||||
CaaFlags: 1,
|
||||
}
|
||||
expected = "example.com.\t300\tIN\tCAA\t1 iodef \"mailto:test@example.com\""
|
||||
found = experiment.ToRR().String()
|
||||
if found != expected {
|
||||
t.Errorf("RR expected (%#v) got (%#v)\n", expected, found)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user