-
Notifications
You must be signed in to change notification settings - Fork 66
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
update easyMock to mock in chime test #815
Conversation
Signed-off-by: rohan19a <[email protected]>
...core/src/test/kotlin/org/opensearch/notifications/core/destinations/ChimeDestinationTests.kt
Outdated
Show resolved
Hide resolved
@rohan19a |
Some tests get failed. Please take a look at why. |
Signed-off-by: rohan19a <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
=========================================
Coverage 66.85% 66.85%
Complexity 263 263
=========================================
Files 39 39
Lines 1738 1738
Branches 165 165
=========================================
Hits 1162 1162
Misses 453 453
Partials 123 123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM
Can we replace the EasyMock with mockk in this test case also? Then we can remove the dependency for EasyMock in ChimeDestinationTests |
Missed that somehow, I'll edit that and recommit |
Signed-off-by: rohan19a <[email protected]>
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.
lgtm
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.
Looks good to me, we have serval files still using easyMock, we can have follow up PR to remove them all, after that we can remove the dependency of easyMock
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/notifications/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/notifications/backport-2.x
# Create a new branch
git switch --create backport/backport-815-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 09d1c03a2411c057bc73543562cc166cb0944c8d
# Push it to GitHub
git push --set-upstream origin backport/backport-815-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/notifications/backport-2.x Then, create a pull request where the |
Shall we manually backport this PR to 2.x branch? |
@rohan19a would you mind to do manual backport according to #815 (comment) |
In main branch we use mockk to create a CloseableHttpResponse instance, while in 2.x we still used EasyMock, and the code inconsistence causes the backport fail. We need to manual backport and replace all EasyMock usage in the backport PR. |
Description
Updated a chime webhook test from easyMock to Mockk
Issues Resolved
#237
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.