mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 14:56:20 +08:00
fix build
This commit is contained in:
parent
d006f62f8f
commit
e30cbff674
|
@ -8,20 +8,20 @@ func TestKey(t *testing.T) {
|
|||
expected RecordKey
|
||||
}{
|
||||
{
|
||||
RecordConfig{Type: "A", Name: "@"},
|
||||
RecordKey{Type: "A", Name: "@"},
|
||||
RecordConfig{Type: "A", NameFQDN: "example.com"},
|
||||
RecordKey{Type: "A", NameFQDN: "example.com"},
|
||||
},
|
||||
{
|
||||
RecordConfig{Type: "R53_ALIAS", Name: "@"},
|
||||
RecordKey{Type: "R53_ALIAS", Name: "@"},
|
||||
RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com"},
|
||||
RecordKey{Type: "R53_ALIAS", NameFQDN: "example.com"},
|
||||
},
|
||||
{
|
||||
RecordConfig{Type: "R53_ALIAS", Name: "@", R53Alias: map[string]string{"foo": "bar"}},
|
||||
RecordKey{Type: "R53_ALIAS", Name: "@"},
|
||||
RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com", R53Alias: map[string]string{"foo": "bar"}},
|
||||
RecordKey{Type: "R53_ALIAS", NameFQDN: "example.com"},
|
||||
},
|
||||
{
|
||||
RecordConfig{Type: "R53_ALIAS", Name: "@", R53Alias: map[string]string{"type": "AAAA"}},
|
||||
RecordKey{Type: "R53_ALIAS_AAAA", Name: "@"},
|
||||
RecordConfig{Type: "R53_ALIAS", NameFQDN: "example.com", R53Alias: map[string]string{"type": "AAAA"}},
|
||||
RecordKey{Type: "R53_ALIAS_AAAA", NameFQDN: "example.com"},
|
||||
},
|
||||
}
|
||||
for i, test := range tests {
|
||||
|
|
|
@ -15,7 +15,7 @@ func flattenSPFs(cfg *models.DNSConfig) []error {
|
|||
var errs []error
|
||||
var err error
|
||||
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
|
||||
for _, txt := range apexTXTs {
|
||||
var rec *spflib.SPFRecord
|
||||
|
|
Loading…
Reference in a new issue