Skip to content

Commit

Permalink
Add test so we don't fail on long domains
Browse files Browse the repository at this point in the history
  • Loading branch information
mat285 committed Aug 9, 2024
1 parent 027c83d commit 999c7ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions provider/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 999c7ae

Please sign in to comment.