Fix CNAME and glue record behavior
This commit is contained in:
parent
07da2a1269
commit
fa4f5ba7ab
3 changed files with 28 additions and 11 deletions
|
|
@ -181,8 +181,15 @@ func TestFullZone(t *testing.T) {
|
|||
assertRecord(t, res.Answer[0].Record, "CNAME", 3600, "example.com")
|
||||
})
|
||||
|
||||
t.Run("Lookup www.example.com TXT", func(t *testing.T) {
|
||||
res, ok := zFull.LookupType("www.example.com", "TXT")
|
||||
t.Run("LookupType www.example.com A", func(t *testing.T) {
|
||||
res, ok := zFull.LookupType("www.example.com", "CNAME")
|
||||
assertOk(t, ok)
|
||||
assertRecordCount(t, res, 1)
|
||||
assertRecord(t, res.Answer[0].Record, "CNAME", 3600, "example.com")
|
||||
})
|
||||
|
||||
t.Run("LookupType mail.example.com TXT", func(t *testing.T) {
|
||||
res, ok := zFull.LookupType("mail.example.com", "TXT")
|
||||
assertOk(t, ok)
|
||||
assertRecordCount(t, res, 0)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue