Skip to content

Commit 51d0ed1

Browse files
committed
address review comments
1 parent 34fd685 commit 51d0ed1

2 files changed

Lines changed: 12 additions & 17 deletions

File tree

cmd/e2e/test_environment.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ import (
2323
var (
2424
kubernetesClient, stacksetClient, routegroupClient = createClients()
2525
namespace = requiredEnvar("E2E_NAMESPACE")
26-
clusterDomain = requiredEnvar("CLUSTER_DOMAIN")
27-
clusterDomainInternal = requiredEnvar("CLUSTER_DOMAIN_INTERNAL")
28-
clusterDomains = []string{clusterDomain, clusterDomainInternal}
29-
perStackDomains = []string{"ingress.cluster.local"}
30-
controllerId = os.Getenv("CONTROLLER_ID")
31-
waitTimeout time.Duration
32-
trafficSwitchWaitTimeout time.Duration
26+
// Domains used to generate hostnames for the main Stackset Ingresses.
27+
clusterDomain = requiredEnvar("CLUSTER_DOMAIN")
28+
clusterDomainInternal = requiredEnvar("CLUSTER_DOMAIN_INTERNAL")
29+
clusterDomains = []string{clusterDomain, clusterDomainInternal}
30+
// Domains used to generate hostnames for the per Stackset Ingresses.
31+
perStackDomains = []string{"ingress.cluster.local"}
32+
controllerId = os.Getenv("CONTROLLER_ID")
33+
waitTimeout time.Duration
34+
trafficSwitchWaitTimeout time.Duration
3335
)
3436

3537
func init() {

pkg/core/stack_resources_test.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package core
22

33
import (
44
"errors"
5-
"fmt"
65
"reflect"
76
"slices"
87
"strconv"
@@ -312,9 +311,7 @@ func TestStackGenerateIngress(t *testing.T) {
312311
stackGenerationAnnotationKey: "11",
313312
"ingress": "annotation",
314313
},
315-
expectedHosts: []string{
316-
fmt.Sprintf("foo-v1.%s", perStackDomain),
317-
},
314+
expectedHosts: []string{"foo-v1.ingress.cluster.local"},
318315
},
319316
} {
320317
t.Run(tc.name, func(t *testing.T) {
@@ -626,9 +623,7 @@ func TestStackGenerateRouteGroup(t *testing.T) {
626623
stackGenerationAnnotationKey: "11",
627624
"routegroup": "annotation",
628625
},
629-
expectedHosts: []string{
630-
fmt.Sprintf("foo-v1.%s", perStackDomain),
631-
},
626+
expectedHosts: []string{"foo-v1.ingress.cluster.local"},
632627
},
633628
{
634629
name: "custom load balancer",
@@ -645,9 +640,7 @@ func TestStackGenerateRouteGroup(t *testing.T) {
645640
expectedAnnotations: map[string]string{
646641
stackGenerationAnnotationKey: "11",
647642
},
648-
expectedHosts: []string{
649-
fmt.Sprintf("foo-v1.%s", perStackDomain),
650-
},
643+
expectedHosts: []string{"foo-v1.ingress.cluster.local"},
651644
},
652645
} {
653646
t.Run(tc.name, func(t *testing.T) {

0 commit comments

Comments
 (0)