Skip to content

Commit 500a154

Browse files
committed
chore: use MeshMultiZoneService builder within meshtimeout
1 parent a0a434e commit 500a154

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

test/e2e_env/multizone/meshtimeout/meshtimeout.go

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"time"
66

7+
core_meta "github.com/kumahq/kuma/v2/pkg/core/metadata"
78
. "github.com/onsi/ginkgo/v2"
89
. "github.com/onsi/gomega"
910
"golang.org/x/sync/errgroup"
@@ -25,7 +26,14 @@ import (
2526
func MeshTimeout() {
2627
const mesh = "multizone-meshtimeout"
2728
const k8sZoneNamespace = "multizone-meshtimeout-ns"
28-
29+
mshZone := builders.MeshMultiZoneService().
30+
WithName("test-server").
31+
WithMesh(mesh).
32+
WithServiceLabelSelector(map[string]string{
33+
"kuma.io/display-name": "test-server",
34+
"k8s.kuma.io/namespace": k8sZoneNamespace,
35+
}).
36+
AddIntPortWithName(80, core_meta.ProtocolHTTP, "80").Build()
2937
BeforeAll(func() {
3038
// Global
3139
Expect(NewClusterSetup().
@@ -38,20 +46,7 @@ func MeshTimeout() {
3846
),
3947
).
4048
Install(MeshTrafficPermissionAllowAllUniversal(mesh)).
41-
Install(YamlUniversal(fmt.Sprintf(`
42-
type: MeshMultiZoneService
43-
name: test-server
44-
mesh: %s
45-
spec:
46-
selector:
47-
meshService:
48-
matchLabels:
49-
kuma.io/display-name: test-server
50-
k8s.kuma.io/namespace: %s
51-
ports:
52-
- port: 80
53-
appProtocol: http
54-
`, mesh, k8sZoneNamespace))).
49+
Install(ResourceUniversal(mshZone)).
5550
Setup(multizone.Global)).To(Succeed())
5651
Expect(WaitForMesh(mesh, multizone.Zones())).To(Succeed())
5752

0 commit comments

Comments
 (0)