Skip to content

Commit bc49971

Browse files
author
lec-bit
committed
update2
Signed-off-by: lec-bit <glfhzmy@126.com>
1 parent 1892f47 commit bc49971

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

test/e2e/baseline_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build integ
2-
// +build integ
3-
41
/*
52
* Copyright The Kmesh Authors.
63
*

test/e2e/main_test.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build integ
2-
// +build integ
3-
41
/*
52
* Copyright The Kmesh Authors.
63
*
@@ -24,9 +21,11 @@ import (
2421
"time"
2522

2623
"istio.io/api/label"
27-
"istio.io/istio/pkg/config/protocol"
2824
"istio.io/istio/pkg/test/framework"
2925
"istio.io/istio/pkg/test/framework/components/echo"
26+
"istio.io/istio/pkg/test/framework/components/echo/common/ports"
27+
"istio.io/istio/pkg/test/framework/components/echo/deployment"
28+
"istio.io/istio/pkg/test/framework/components/echo/match"
3029
"istio.io/istio/pkg/test/framework/components/namespace"
3130
"istio.io/istio/pkg/test/framework/resource"
3231
)
@@ -38,6 +37,9 @@ var (
3837
type EchoDeployments struct {
3938
Namespace namespace.Instance
4039
All echo.Instances
40+
41+
// The echo service which is enrolled to Kmesh without waypoint.
42+
EnrolledToKmesh echo.Instances
4143
}
4244

4345
const (
@@ -76,16 +78,12 @@ func SetupApps(t resource.Context, apps *EchoDeployments) error {
7678
return err
7779
}
7880

79-
builder := echo.New(t).
81+
builder := deployment.New(t).
8082
WithClusters(t.Clusters()...).
8183
WithConfig(echo.Config{
82-
Service: ServiceName,
83-
Namespace: apps.Namespace,
84-
Ports: echo.Ports{{
85-
Name: "http",
86-
Protocol: protocol.HTTP,
87-
Port: 8080,
88-
}},
84+
Service: ServiceName,
85+
Namespace: apps.Namespace,
86+
Ports: ports.All(),
8987
ServiceAccount: true,
9088
Subsets: []echo.SubsetConfig{
9189
{
@@ -113,5 +111,6 @@ func SetupApps(t resource.Context, apps *EchoDeployments) error {
113111
}
114112

115113
apps.All = echos
114+
apps.EnrolledToKmesh = match.ServiceName(echo.NamespacedName{Name: EnrolledToKmesh, Namespace: apps.Namespace}).GetMatches(echos)
116115
return nil
117116
}

test/e2e/restart_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build integ
2-
// +build integ
3-
41
/*
52
* Copyright The Kmesh Authors.
63
*
@@ -42,7 +39,7 @@ import (
4239
func TestKmeshRestart(t *testing.T) {
4340
framework.NewTest(t).Run(func(t framework.TestContext) {
4441
src := apps.All[0]
45-
dst := apps.All[1]
42+
dst := apps.EnrolledToKmesh[0]
4643
options := echo.CallOptions{
4744
To: dst,
4845
Count: 1,

test/e2e/run_test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,13 @@ fi
278278
kubectl config use-context "kind-$NAME"
279279
echo "Running tests in cluster '$NAME'"
280280

281-
281+
sed -i 's/dual-engine/kernel-native/g' $ROOT_DIR/deploy/charts/kmesh-helm/values.yaml
282282
# make sure the Kmesh local image is ready.
283283
if [[ -z "${SKIP_SETUP:-}" ]]; then
284284
setup_istio
285285
setup_kmesh
286286
fi
287287

288-
sed -i 's/dual-engine/kernel-native/g' $ROOT_DIR/deploy/charts/kmesh-helm/values.yaml
289-
290288
cmd="go test -v -tags=integ $ROOT_DIR/test/e2e/... -istio.test.kube.loadbalancer=false ${PARAMS[*]}"
291289

292290
bash -c "$cmd"

0 commit comments

Comments
 (0)