1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Add TLSA record support (#165) (#203)

This commit is contained in:
eliheady
2017-09-15 09:03:29 -04:00
committed by Tom Limoncelli
parent a342aa7e90
commit 4aac517d62
15 changed files with 292 additions and 108 deletions

View File

@@ -51,4 +51,20 @@ func TestRR(t *testing.T) {
if found != expected {
t.Errorf("RR expected (%#v) got (%#v)\n", expected, found)
}
experiment = RecordConfig{
Type: "TLSA",
Name: "@",
Target: "abcdef0123456789",
TTL: 300,
NameFQDN: "_443._tcp.example.com",
TlsaUsage: 0,
TlsaSelector: 0,
TlsaMatchingType: 1,
}
expected = "_443._tcp.example.com.\t300\tIN\tTLSA\t0 0 1 abcdef0123456789"
found = experiment.ToRR().String()
if found != expected {
t.Errorf("RR expected (%#v) got (%#v)\n", expected, found)
}
}