From 999c7ae4a04c2edc766cc07ab349c0f69f980c4a Mon Sep 17 00:00:00 2001 From: mat285 Date: Fri, 9 Aug 2024 13:43:01 -0400 Subject: [PATCH] Add test so we don't fail on long domains --- provider/aws/aws_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/provider/aws/aws_test.go b/provider/aws/aws_test.go index 418e05d09e..df9392a494 100644 --- a/provider/aws/aws_test.go +++ b/provider/aws/aws_test.go @@ -492,6 +492,13 @@ func TestAWSRecords(t *testing.T) { TTL: aws.Int64(recordTTL), ResourceRecords: []*route53.ResourceRecord{{Value: aws.String("10 mailhost1.example.com")}, {Value: aws.String("20 mailhost2.example.com")}}, }, + { + // This domain has 63 characters but one of them is `~` which encodes to a longer string than allowed + Name: aws.String("long-domain-with-irregular-characters\\176longer-than-63-characters.zone-1.ext-dns-test-2.teapot.zalan.do."), + Type: aws.String(route53.RRTypeCname), + TTL: aws.Int64(recordTTL), + ResourceRecords: []*route53.ResourceRecord{{Value: aws.String("long-domain.example.com")}}, + }, }) records, err := provider.Records(context.Background())