From 1eec428bf7fcaaa8505a50851436f7d2d4b0982c Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 4 Mar 2024 15:49:02 +0100 Subject: [PATCH] chore(ingress): add test with invalid hostname --- source/ingress_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/ingress_test.go b/source/ingress_test.go index 2be3eddfd0..6198f577b2 100644 --- a/source/ingress_test.go +++ b/source/ingress_test.go @@ -264,6 +264,13 @@ func testEndpointsFromIngress(t *testing.T) { expected: []*endpoint.Endpoint{}, ignoreIngressRulesSpec: true, }, + { + title: "invalid hostname does not generate endpoints", + ingress: fakeIngress{ + dnsnames: []string{"this-is-an-exceedingly-long-label-that-external-dns-should-reject.example.org"}, + }, + expected: []*endpoint.Endpoint{}, + }, } { t.Run(ti.title, func(t *testing.T) { realIngress := ti.ingress.Ingress()