mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08: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:
parent
489be2e3dc
commit
f0ea71584f
1 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue