Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e test for Kmesh daemon restart #661

Merged
merged 4 commits into from
Aug 5, 2024
Merged

Conversation

YaoZengzeng
Copy link
Member

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

Add E2E case for that managed applications can work properly before, during and after Kmesh daemon restart

Which issue(s) this PR fixes:
Fixes part of #642

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kmesh-bot kmesh-bot added the kind/enhancement New feature or request label Aug 1, 2024
@YaoZengzeng
Copy link
Member Author

/hold

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.00%. Comparing base (6b2ebcc) to head (8dff662).
Report is 9 commits behind head on main.

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c10c28...8dff662. Read the comment docs.

Signed-off-by: YaoZengzeng <[email protected]>
@YaoZengzeng
Copy link
Member Author

/unhold

@YaoZengzeng
Copy link
Member Author

@hzxuzhonghu PTAL

@@ -574,6 +578,73 @@ func TestRemoveAddNsOrServiceWaypoint(t *testing.T) {
}
}

func TestKmeshRestart(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer split restart tests into restart_test.go

@@ -176,6 +180,7 @@ func SetupApps(t resource.Context, i istio.Instance, apps *EchoDeployments) erro
}
apps.All = echos
apps.EnrolledToKmesh = match.ServiceName(echo.NamespacedName{Name: EnrolledToKmesh, Namespace: apps.Namespace}).GetMatches(echos)
apps.ServiceWithWaypointAtServiceGranularity = match.ServiceName(echo.NamespacedName{Name: ServiceWithWaypointAtServiceGranularity, Namespace: apps.Namespace}).GetMatches(echos)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused how did you test waypoint-captuired service before without an app

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waypoint-captured service has always existed. We are not going to creat here, but just assign it to this variable for easy use in test case later.

Signed-off-by: YaoZengzeng <[email protected]>
@kmesh-bot kmesh-bot added size/L and removed size/M labels Aug 2, 2024
@YaoZengzeng
Copy link
Member Author

@hzxuzhonghu updated

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@@ -74,6 +74,9 @@ type EchoDeployments struct {
// The echo service which is enrolled to Kmesh without waypoint.
EnrolledToKmesh echo.Instances

// The echo service which is enrolled to Kmesh and with service waypoint.
ServiceWithWaypointAtServiceGranularity echo.Instances

// WaypointProxies by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: by what

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kmesh-bot kmesh-bot merged commit ea495f6 into kmesh-net:main Aug 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants