diff options
author | 2023-03-23 11:34:11 -0400 | |
---|---|---|
committer | 2023-03-23 11:34:11 -0400 | |
commit | 48c40ae1cd4e0c0a2b6aaf0141c7111822ac7cd3 (patch) | |
tree | d69c4840517673ec9c0b2f6bd17b7ea65f14fc9a /plugin/clouddns/clouddns_test.go | |
parent | c2d56581b5b90dcf5b60a012b25c0101090ba40b (diff) | |
download | coredns-48c40ae1cd4e0c0a2b6aaf0141c7111822ac7cd3.tar.gz coredns-48c40ae1cd4e0c0a2b6aaf0141c7111822ac7cd3.tar.zst coredns-48c40ae1cd4e0c0a2b6aaf0141c7111822ac7cd3.zip |
fix: clouddns plugin answers limited to one response (#5986)
* inserts all records in the loop. checks for insert errors. adds test. fixes #5985
Signed-off-by: Marcos Mendez <marcos_mendez@homedepot.com>
Diffstat (limited to 'plugin/clouddns/clouddns_test.go')
-rw-r--r-- | plugin/clouddns/clouddns_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/clouddns/clouddns_test.go b/plugin/clouddns/clouddns_test.go index e052bf256..62c4cedb3 100644 --- a/plugin/clouddns/clouddns_test.go +++ b/plugin/clouddns/clouddns_test.go @@ -114,6 +114,15 @@ func (c fakeGCPClient) listRRSets(ctx context.Context, projectName, hostedZoneNa Type: "SOA", Rrdatas: []string{"ns-cloud-e1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, }, + { + Name: "_dummy._tcp.example.org.", + Ttl: 300, + Type: "SRV", + Rrdatas: []string{ + "0 0 5269 split-example.org", + "0 0 5269 other-example.org", + }, + }, } } @@ -262,6 +271,15 @@ func TestCloudDNS(t *testing.T) { "www.example.org. 300 IN A 1.2.3.4", }, }, + // 13. example.org SRV found with 2 answers - success. + { + qname: "_dummy._tcp.example.org.", + qtype: dns.TypeSRV, + wantAnswer: []string{ + "_dummy._tcp.example.org. 300 IN SRV 0 0 5269 split-example.org.", + "_dummy._tcp.example.org. 300 IN SRV 0 0 5269 other-example.org.", + }, + }, } for ti, tc := range tests { |