@@ -402,6 +402,44 @@ func TestGenerateRouteStructure(t *testing.T) {
402402 Annotations : map [string ]string {},
403403 AlternativeNames : []string {},
404404 Wildcard : helpers .BoolPtr (true ),
405+ WildcardApex : helpers .BoolPtr (true ),
406+ IngressName : "wildcard-www.example.com" ,
407+ RequestVerification : helpers .BoolPtr (false ),
408+ },
409+ },
410+ },
411+ },
412+ {
413+ name : "test8 - wildcard with tls-acme false wildcard apex disabled" ,
414+ args : args {
415+ yamlRoutes : & RoutesV2 {},
416+ yamlRouteMap : map [string ][]Route {
417+ "nginx" : {
418+ {
419+ Ingresses : map [string ]Ingress {
420+ "www.example.com" : {
421+ TLSAcme : helpers .BoolPtr (false ),
422+ Wildcard : helpers .BoolPtr (true ),
423+ WildcardApex : helpers .BoolPtr (false ),
424+ },
425+ },
426+ },
427+ },
428+ },
429+ activeStandby : false ,
430+ },
431+ want : & RoutesV2 {
432+ Routes : []RouteV2 {
433+ {
434+ Domain : "www.example.com" ,
435+ LagoonService : "nginx" ,
436+ MonitoringPath : "/" ,
437+ Insecure : helpers .StrPtr ("Redirect" ),
438+ TLSAcme : helpers .BoolPtr (false ),
439+ Annotations : map [string ]string {},
440+ AlternativeNames : []string {},
441+ Wildcard : helpers .BoolPtr (true ),
442+ WildcardApex : helpers .BoolPtr (false ),
405443 IngressName : "wildcard-www.example.com" ,
406444 RequestVerification : helpers .BoolPtr (false ),
407445 },
@@ -633,7 +671,8 @@ func TestMergeRouteStructures(t *testing.T) {
633671 Annotations : map [string ]string {},
634672 AlternativeNames : []string {},
635673 Wildcard : helpers .BoolPtr (true ),
636- IngressName : "example.com" ,
674+ WildcardApex : helpers .BoolPtr (true ),
675+ IngressName : "wildcard-example.com" ,
637676 RequestVerification : helpers .BoolPtr (false ),
638677 },
639678 {
@@ -645,7 +684,8 @@ func TestMergeRouteStructures(t *testing.T) {
645684 Annotations : map [string ]string {},
646685 AlternativeNames : []string {},
647686 Wildcard : helpers .BoolPtr (true ),
648- IngressName : "a.example.com" ,
687+ WildcardApex : helpers .BoolPtr (true ),
688+ IngressName : "wildcard-a.example.com" ,
649689 RequestVerification : helpers .BoolPtr (false ),
650690 },
651691 },
0 commit comments