-
Notifications
You must be signed in to change notification settings - Fork 214
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
feat: add telegram bot to lavap health #1862
base: main
Are you sure you want to change the base?
Conversation
Test Results2 389 tests +1 2 388 ✅ ±0 26m 23s ⏱️ +46s Results for commit 4d9a648. ± Comparison against base commit 537c7ca. This pull request removes 3 and adds 4 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
checkRequest: func(t *testing.T, r *http.Request) { | ||
// Check method and content type | ||
assert.Equal(t, "POST", r.Method) | ||
assert.Equal(t, "application/json", r.Header.Get("Content-Type")) | ||
|
||
// Read and verify request body | ||
body, err := io.ReadAll(r.Body) | ||
require.NoError(t, err) | ||
|
||
// Check if body contains expected content | ||
bodyStr := string(body) | ||
assert.Contains(t, bodyStr, "Test Alert") | ||
assert.Contains(t, bodyStr, "severity") | ||
assert.Contains(t, bodyStr, "high") | ||
assert.Contains(t, bodyStr, "service") | ||
assert.Contains(t, bodyStr, "test-service") | ||
}, |
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.
Why is this here and not inside the test itself?
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.
since not all scenatious need to check the request
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changemain
branchReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...