-
Notifications
You must be signed in to change notification settings - Fork 93
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
implemented e2e test on log #1242
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
test/e2e/log_test.go
Outdated
|
||
func TestLoggerEndToEnd(t *testing.T) { | ||
// Mock HTTP server for Kmesh daemon pod | ||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the real Kmesh daemon instead of a mock.
We have installed Kmesh in https://github.com/kmesh-net/kmesh/blob/main/test/e2e/run_test.sh
test/e2e/log_test.go
Outdated
|
||
// Test cases | ||
t.Run("Get all loggers", func(t *testing.T) { | ||
output := captureOutput(func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use the real kmeshctl
binary to test.
@YaoZengzeng I have made the changes you asked for |
@harshitghagre you should pass the test case you have wrote, as well as the rest of the CI. |
What type of PR is this?
/kind enhancement
What this PR does:
e2e test for the log package
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: