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

Downcase DNS names (#253)

* Downcase DNS names
* Document opinions
This commit is contained in:
Tom Limoncelli
2017-11-07 14:12:17 -08:00
committed by Tom Limoncelli
parent b614501d56
commit e7472f76f3
20 changed files with 235 additions and 3 deletions

View File

@ -112,6 +112,7 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
}
dom.Records = append(dom.Records, &rc)
}
models.Downcase(dom.Records)
dom2, _ := dom.Copy()
// get corrections for first time
corrections, err := prv.GetDomainCorrections(dom)
@ -392,6 +393,16 @@ func makeTests(t *testing.T) []*TestCase {
)
}
// Case
tests = append(tests, tc("Empty"),
tc("Empty"),
tc("Create CAPS", mx("BAR", 5, "BAR.com.")),
tc("Downcase label", mx("bar", 5, "BAR.com."), a("decoy", "1.1.1.1")),
tc("Downcase target", mx("bar", 5, "bar.com."), a("decoy", "2.2.2.2")),
tc("Upcase both", mx("BAR", 5, "BAR.COM."), a("decoy", "3.3.3.3")),
// The decoys are required so that there is at least one actual change in each tc.
)
// Test large zonefiles.
// Mostly to test paging. Many providers page at 100
// Known page sizes: