1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Tom Limoncelli
2020-03-10 16:53:17 -04:00
committed by GitHub
parent 24484f1e0c
commit 14e48b9b07
14 changed files with 30 additions and 21 deletions

View File

@@ -33,7 +33,7 @@ func TestImportTransform(t *testing.T) {
cfg := &models.DNSConfig{
Domains: []*models.DomainConfig{src, dst},
}
if errs := NormalizeAndValidateConfig(cfg); len(errs) != 0 {
if errs := ValidateAndNormalizeConfig(cfg); len(errs) != 0 {
for _, err := range errs {
t.Error(err)
}

View File

@@ -268,8 +268,8 @@ type Warning struct {
error
}
// NormalizeAndValidateConfig performs and normalization and/or validation of the IR.
func NormalizeAndValidateConfig(config *models.DNSConfig) (errs []error) {
// ValidateAndNormalizeConfig performs and normalization and/or validation of the IR.
func ValidateAndNormalizeConfig(config *models.DNSConfig) (errs []error) {
for _, domain := range config.Domains {
pTypes := []string{}
txtMultiDissenters := []string{}

View File

@@ -210,7 +210,7 @@ func TestCAAValidation(t *testing.T) {
},
},
}
errs := NormalizeAndValidateConfig(config)
errs := ValidateAndNormalizeConfig(config)
if len(errs) != 1 {
t.Error("Expect error on invalid CAA but got none")
}
@@ -277,7 +277,7 @@ func TestTLSAValidation(t *testing.T) {
},
},
}
errs := NormalizeAndValidateConfig(config)
errs := ValidateAndNormalizeConfig(config)
if len(errs) != 1 {
t.Error("Expect error on invalid TLSA but got none")
}