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

Refactor RecordConfig: Add getters/setters (#314)

* Replace RecordConfig.Name and .NameFQDN with getters and setters.
* Replace RecordConfig.Target with getters and setters.
* Eliminate the CombinedTarget concept.
* Add RecordConfig.PopulateFromString to reduce code in all providers.
* encode and decode name.com txt records (#315)
* Replace fmt.Errorf with errors.Errorf
This commit is contained in:
Tom Limoncelli
2018-02-15 12:02:50 -05:00
committed by GitHub
parent 324b1ea930
commit de4455942b
37 changed files with 1237 additions and 965 deletions

View File

@ -196,7 +196,7 @@ func TestCAAValidation(t *testing.T) {
Name: "example.com",
RegistrarName: "BIND",
Records: []*models.RecordConfig{
{Name: "@", Type: "CAA", CaaTag: "invalid", Target: "example.com"},
{Name: "@", NameFQDN: "example.com", Type: "CAA", CaaTag: "invalid", Target: "example.com"},
},
},
},
@ -214,7 +214,7 @@ func TestTLSAValidation(t *testing.T) {
Name: "_443._tcp.example.com",
RegistrarName: "BIND",
Records: []*models.RecordConfig{
{Name: "_443._tcp", Type: "TLSA", TlsaUsage: 4, TlsaSelector: 1, TlsaMatchingType: 1, Target: "abcdef0"},
{Name: "_443._tcp", NameFQDN: "_443._tcp._443._tcp.example.com", Type: "TLSA", TlsaUsage: 4, TlsaSelector: 1, TlsaMatchingType: 1, Target: "abcdef0"},
},
},
},