mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Merge branch 'master' into tlim_corrector
This commit is contained in:
@ -497,10 +497,12 @@ func printOrRunCorrections(domain string, provider string, corrections []*models
|
|||||||
if interactive && !out.PromptToRun() {
|
if interactive && !out.PromptToRun() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = correction.F()
|
if correction.F != nil {
|
||||||
out.EndCorrection(err)
|
err = correction.F()
|
||||||
if err != nil {
|
out.EndCorrection(err)
|
||||||
anyErrors = true
|
if err != nil {
|
||||||
|
anyErrors = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
notifier.Notify(domain, provider, correction.Msg, err, !push)
|
notifier.Notify(domain, provider, correction.Msg, err, !push)
|
||||||
|
@ -844,19 +844,18 @@ func makeTests(t *testing.T) []*TestGroup {
|
|||||||
// of record. When the provider fixes the bug or changes behavior,
|
// of record. When the provider fixes the bug or changes behavior,
|
||||||
// update the AuditRecords().
|
// update the AuditRecords().
|
||||||
|
|
||||||
tc("TXT with 0-octel string", txt("foo1", "")),
|
// NB(tlim) 2023-03-07: Removing this test. Nobody does this.
|
||||||
|
//tc("TXT with 0-octel string", txt("foo1", "")),
|
||||||
// https://github.com/StackExchange/dnscontrol/issues/598
|
// https://github.com/StackExchange/dnscontrol/issues/598
|
||||||
// RFC1035 permits this, but rarely do provider support it.
|
// RFC1035 permits this, but rarely do provider support it.
|
||||||
//clear(),
|
//clear(),
|
||||||
|
//tc("a 255-byte TXT", txt("foo255", strings.Repeat("C", 255))),
|
||||||
tc("a 255-byte TXT", txt("foo255", strings.Repeat("C", 255))),
|
|
||||||
//clear(),
|
//clear(),
|
||||||
tc("a 256-byte TXT", txt("foo256", strings.Repeat("D", 256))),
|
//tc("a 256-byte TXT", txt("foo256", strings.Repeat("D", 256))),
|
||||||
//clear(),
|
//clear(),
|
||||||
|
//tc("a 512-byte TXT", txt("foo512", strings.Repeat("C", 512))),
|
||||||
tc("a 512-byte TXT", txt("foo512", strings.Repeat("C", 512))),
|
|
||||||
//clear(),
|
//clear(),
|
||||||
tc("a 513-byte TXT", txt("foo513", strings.Repeat("D", 513))),
|
//tc("a 513-byte TXT", txt("foo513", strings.Repeat("D", 513))),
|
||||||
//clear(),
|
//clear(),
|
||||||
|
|
||||||
tc("TXT with 1 single-quote", txt("foosq", "quo'te")),
|
tc("TXT with 1 single-quote", txt("foosq", "quo'te")),
|
||||||
|
@ -282,12 +282,11 @@ func toRc(domain string, r *godo.DomainRecord) *models.RecordConfig {
|
|||||||
CaaFlag: uint8(r.Flags),
|
CaaFlag: uint8(r.Flags),
|
||||||
}
|
}
|
||||||
t.SetLabelFromFQDN(name, domain)
|
t.SetLabelFromFQDN(name, domain)
|
||||||
t.SetTarget(target)
|
|
||||||
switch rtype := r.Type; rtype {
|
switch rtype := r.Type; rtype {
|
||||||
case "TXT":
|
case "TXT":
|
||||||
t.SetTargetTXTfromRFC1035Quoted(target)
|
t.SetTargetTXT(target)
|
||||||
default:
|
default:
|
||||||
// nothing additional required
|
t.SetTarget(target)
|
||||||
}
|
}
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
@ -309,7 +308,7 @@ func toReq(dc *models.DomainConfig, rc *models.RecordConfig) *godo.DomainRecordE
|
|||||||
priority = int(rc.SrvPriority)
|
priority = int(rc.SrvPriority)
|
||||||
case "TXT":
|
case "TXT":
|
||||||
// TXT records are the one place where DO combines many items into one field.
|
// TXT records are the one place where DO combines many items into one field.
|
||||||
target = rc.GetTargetField()
|
target = rc.GetTargetTXTJoined()
|
||||||
default:
|
default:
|
||||||
// no action required
|
// no action required
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user