From 657272db9eac700df23e1a0aa850b52f2a1544ab Mon Sep 17 00:00:00 2001 From: Robert Blenkinsopp Date: Sun, 23 Aug 2020 09:06:21 +0100 Subject: [PATCH] Add integration test for TXT records longer than 255 characters --- integrationTest/integration_test.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/integrationTest/integration_test.go b/integrationTest/integration_test.go index 1f0b2c1d2..39576d1c6 100644 --- a/integrationTest/integration_test.go +++ b/integrationTest/integration_test.go @@ -438,7 +438,7 @@ func ignoreName(name string) *rec { func ignoreTarget(name string, typ string) *rec { r := &rec{ - Type: "IGNORE_TARGET", + Type: "IGNORE_TARGET", Target: typ, } r.SetLabel(name, "**current-domain**") @@ -509,16 +509,16 @@ func tc(desc string, recs ...*rec) *TestCase { } else if r.Type == "IGNORE_TARGET" { ignoredTargets = append(ignoredTargets, &models.IgnoreTarget{ Pattern: r.GetLabel(), - Type: r.Target, + Type: r.Target, }) } else { records = append(records, r) } } return &TestCase{ - Desc: desc, - Records: records, - IgnoredNames: ignoredNames, + Desc: desc, + Records: records, + IgnoredNames: ignoredNames, IgnoredTargets: ignoredTargets, } } @@ -874,6 +874,12 @@ func makeTests(t *testing.T) []*TestGroup { txtmulti("foo3", []string{strings.Repeat("X", 255), strings.Repeat("Y", 255), strings.Repeat("Z", 255)})), ), + testgroup("TXTLong", + requires(providers.CanUseTXTMulti), + only("HEDNS"), + tc("TXT longer than 255 bytes", txt("foo1", strings.Repeat("X", 256))), + ), + testgroup("DS", requires(providers.CanUseDS), tc("create DS", ds("@", 1, 13, 1, "ADIGEST")),