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

AZUREDNS: Do not warn about underscore for acm-validations.aws (#661)

* Check for acm-validations.aws.
This commit is contained in:
Tom Limoncelli
2020-02-27 23:10:35 -05:00
committed by GitHub
parent a57bf35788
commit 4adef209c7
2 changed files with 19 additions and 11 deletions

View File

@ -12,17 +12,20 @@ func TestCheckLabel(t *testing.T) {
var tests = []struct {
label string
rType string
target string
isError bool
hasSkipMeta bool
}{
{"@", "A", false, false},
{"foo.bar", "A", false, false},
{"_foo", "A", true, false},
{"_foo", "SRV", false, false},
{"_foo", "TLSA", false, false},
{"_foo", "TXT", false, false},
{"test.foo.tld", "A", true, false},
{"test.foo.tld", "A", false, true},
{"@", "A", "zap", false, false},
{"foo.bar", "A", "zap", false, false},
{"_foo", "A", "zap", true, false},
{"_foo", "SRV", "zap", false, false},
{"_foo", "TLSA", "zap", false, false},
{"_foo", "TXT", "zap", false, false},
{"_y2", "CNAME", "foo", true, false},
{"_y3", "CNAME", "asfljds.acm-validations.aws", false, false},
{"test.foo.tld", "A", "zap", true, false},
{"test.foo.tld", "A", "zap", false, true},
}
for _, test := range tests {
@ -31,7 +34,7 @@ func TestCheckLabel(t *testing.T) {
if test.hasSkipMeta {
meta["skip_fqdn_check"] = "true"
}
err := checkLabel(test.label, test.rType, "foo.tld", meta)
err := checkLabel(test.label, test.rType, test.target, "foo.tld", meta)
if err != nil && !test.isError {
t.Errorf(" Expected no error but got %s", err)
}