mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
plugin/etcd: Fix multi record TXT lookups (#5293)
* fix multi-record txt Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -46,12 +46,15 @@ var servicesGroup = []*msg.Service{
|
||||
|
||||
{Host: "127.0.0.1", Key: "a.dom1.skydns.test.", Group: "g1"},
|
||||
{Host: "127.0.0.2", Key: "b.sub.dom1.skydns.test.", Group: "g2"},
|
||||
|
||||
{Text: "foo", Key: "a.dom3.skydns.test.", Group: "g1"},
|
||||
{Text: "bar", Key: "b.sub.dom3.skydns.test.", Group: "g1"},
|
||||
}
|
||||
|
||||
var dnsTestCasesGroup = []test.Case{
|
||||
// Groups
|
||||
{
|
||||
// hits the group 'g1' and only includes those records
|
||||
// hits the group 'g1' and only includes those A records
|
||||
Qname: "dom.skydns.test.", Qtype: dns.TypeA,
|
||||
Answer: []dns.RR{
|
||||
test.A("dom.skydns.test. 300 IN A 127.0.0.1"),
|
||||
@@ -73,4 +76,12 @@ var dnsTestCasesGroup = []test.Case{
|
||||
test.A("dom1.skydns.test. 300 IN A 127.0.0.1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
// hits the group 'g1' and only includes those TXT records
|
||||
Qname: "dom3.skydns.test.", Qtype: dns.TypeTXT,
|
||||
Answer: []dns.RR{
|
||||
test.TXT("dom3.skydns.test. 300 IN TXT bar"),
|
||||
test.TXT("dom3.skydns.test. 300 IN TXT foo"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user