1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
What could possibly go wrong?
This commit is contained in:
Tom Limoncelli
2020-06-18 09:37:57 -04:00
committed by GitHub
parent 84fd4ae33e
commit 676d98fc4a
2656 changed files with 225 additions and 773200 deletions

View File

@ -27,7 +27,7 @@ func makeRCmeta(meta map[string]string) *models.RecordConfig {
}
func TestPreprocess_BoolValidation(t *testing.T) {
cf := &CloudflareApi{}
cf := &CloudflareAPI{}
domain := newDomainConfig()
domain.Records = append(domain.Records, makeRCmeta(map[string]string{metaProxy: "on"}))
@ -49,7 +49,7 @@ func TestPreprocess_BoolValidation(t *testing.T) {
}
func TestPreprocess_BoolValidation_Fails(t *testing.T) {
cf := &CloudflareApi{}
cf := &CloudflareAPI{}
domain := newDomainConfig()
domain.Records = append(domain.Records, &models.RecordConfig{Metadata: map[string]string{metaProxy: "true"}})
err := cf.preprocessConfig(domain)
@ -59,7 +59,7 @@ func TestPreprocess_BoolValidation_Fails(t *testing.T) {
}
func TestPreprocess_DefaultProxy(t *testing.T) {
cf := &CloudflareApi{}
cf := &CloudflareAPI{}
domain := newDomainConfig()
domain.Metadata[metaProxyDefault] = "full"
domain.Records = append(domain.Records, makeRCmeta(map[string]string{metaProxy: "on"}))
@ -78,7 +78,7 @@ func TestPreprocess_DefaultProxy(t *testing.T) {
}
func TestPreprocess_DefaultProxy_Validation(t *testing.T) {
cf := &CloudflareApi{}
cf := &CloudflareAPI{}
domain := newDomainConfig()
domain.Metadata[metaProxyDefault] = "true"
err := cf.preprocessConfig(domain)
@ -100,9 +100,9 @@ func TestIpRewriting(t *testing.T) {
// inside range and proxied
{"1.2.3.4", "255.255.255.4", "full"},
}
cf := &CloudflareApi{}
cf := &CloudflareAPI{}
domain := newDomainConfig()
cf.ipConversions = []transform.IpConversion{{
cf.ipConversions = []transform.IPConversion{{
Low: net.ParseIP("1.2.3.0"),
High: net.ParseIP("1.2.3.40"),
NewBases: []net.IP{net.ParseIP("255.255.255.0")},