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

TESTING: add integration test for no trailing dot in nameservers (#2311)

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
Jakob Ackermann
2023-05-02 20:40:33 +01:00
committed by GitHub
parent 489be2e3dc
commit f0ea71584f

View File

@@ -319,6 +319,14 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
}
// Issue https://github.com/StackExchange/dnscontrol/issues/491
t.Run("No trailing dot in nameserver", func(t *testing.T) {
for _, nameserver := range dc.Nameservers {
if strings.HasSuffix(nameserver.Name, ".") {
t.Errorf("Provider returned nameserver with trailing dot: %s (See issue https://github.com/StackExchange/dnscontrol/issues/491, TL;DR: use models.ToNameserversStripTD in GetNameservers)", nameserver)
}
}
})
}
func TestDualProviders(t *testing.T) {