Skip to content

Commit

Permalink
added unit test NAPTR record
Browse files Browse the repository at this point in the history
  • Loading branch information
wfaulk-bw committed Feb 8, 2019
1 parent 7c7d274 commit 534e697
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,34 @@ var testConvertRRSetToBindTable = []struct {
},
},
},
{
Input: route53.ResourceRecordSet{
Type: aws.String("NAPTR"),
Name: aws.String("example.com."),
ResourceRecords: []*route53.ResourceRecord{
&route53.ResourceRecord{
Value: aws.String(`100 10 "u" "sip+E2U" "!^.*$!sip:information@foo.se!i" .`),
},
},
TTL: aws.Int64(86400),
},
Output: []dns.RR{
&dns.NAPTR{
Hdr: dns.RR_Header{
Name: "example.com.",
Rrtype: dns.TypeNAPTR,
Class: dns.ClassINET,
Ttl: uint32(86400),
},
Order: 100,
Preference: 10,
Flags: "u",
Service: "sip+E2U",
Regexp: "!^.*$!sip:information@foo.se!i",
Replacement: ".",
},
},
},
{
Input: route53.ResourceRecordSet{
Type: aws.String("A"),
Expand Down

0 comments on commit 534e697

Please sign in to comment.