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

fix build

This commit is contained in:
Craig Peterson
2018-09-07 14:17:02 -04:00
parent d006f62f8f
commit e30cbff674
2 changed files with 9 additions and 9 deletions

View File

@@ -8,20 +8,20 @@ func TestKey(t *testing.T) {
expected RecordKey expected RecordKey
}{ }{
{ {
RecordConfig{Type: "A", Name: "@"}, RecordConfig{Type: "A", NameFQDN: "example.com"},
RecordKey{Type: "A", Name: "@"}, RecordKey{Type: "A", NameFQDN: "example.com"},
}, },
{ {
RecordConfig{Type: "R53_ALIAS", Name: "@"}, RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com"},
RecordKey{Type: "R53_ALIAS", Name: "@"}, RecordKey{Type: "R53_ALIAS", NameFQDN: "example.com"},
}, },
{ {
RecordConfig{Type: "R53_ALIAS", Name: "@", R53Alias: map[string]string{"foo": "bar"}}, RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com", R53Alias: map[string]string{"foo": "bar"}},
RecordKey{Type: "R53_ALIAS", Name: "@"}, RecordKey{Type: "R53_ALIAS", NameFQDN: "example.com"},
}, },
{ {
RecordConfig{Type: "R53_ALIAS", Name: "@", R53Alias: map[string]string{"type": "AAAA"}}, RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com", R53Alias: map[string]string{"type": "AAAA"}},
RecordKey{Type: "R53_ALIAS_AAAA", Name: "@"}, RecordKey{Type: "R53_ALIAS_AAAA", NameFQDN: "example.com"},
}, },
} }
for i, test := range tests { for i, test := range tests {

View File

@@ -15,7 +15,7 @@ func flattenSPFs(cfg *models.DNSConfig) []error {
var errs []error var errs []error
var err error var err error
for _, domain := range cfg.Domains { for _, domain := range cfg.Domains {
apexTXTs := domain.Records.Grouped()[models.RecordKey{Type: "TXT", Name: "@"}] apexTXTs := domain.Records.Grouped()[models.RecordKey{Type: "TXT", NameFQDN: domain.Name}]
// flatten all spf records that have the "flatten" metadata // flatten all spf records that have the "flatten" metadata
for _, txt := range apexTXTs { for _, txt := range apexTXTs {
var rec *spflib.SPFRecord var rec *spflib.SPFRecord