-
Notifications
You must be signed in to change notification settings - Fork 171
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
Add tests for stateManagerCtx #558
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #558 +/- ##
==========================================
+ Coverage 58.04% 58.44% +0.40%
==========================================
Files 55 57 +2
Lines 3568 3973 +405
==========================================
+ Hits 2071 2322 +251
- Misses 1375 1518 +143
- Partials 122 133 +11 ☔ View full report in Codecov by Sentry. |
Signed-off-by: KentHsu <[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.
Great stuff, just a few initial comments from my first look.
- Would you be able to include tests for the deprecated
statemanager
methods until they're removed? - Should the makefile be updated to include a new target that can generate mockfiles using the same flags and which mockgen version/fork you're using e.g. https://github.com/uber-go/mock and a corresponding version
A side note is that I believe we should exclude generated mocks from codecov scans - possibly in a separate PR.
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
This reverts commit 9481caf. Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Thank you for the feedback. I have updated this PR with
|
Just had another skim-read, looking great so far. I haven't forgotten and will pick the review up tomorrow when I get a moment 👌 |
Sure. Please take your time 👍 |
Is there any reason against using Uber's maintained fork to generate mock interfaces? |
I tried both and I didn't see anything blocking us from using Uber's fork. |
This reverts commit be6e8ce. Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
I went ahead to make some commits to use Uber's gomock fork and revert the change in .codecov.yaml. Please let me know if there's any concern. Thanks. |
Signed-off-by: KentHsu <[email protected]>
Hi @mikeee, would you like me to create another PR to exclude the mock files so that this PR won't be block by code coverage? Any suggestions on the code change in this PR? |
@KentHsu please resolve the conflicts |
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Signed-off-by: KentHsu <[email protected]>
Description
This PR add tests for stateManagerCtx
mockgen a mock_client file so stateManagerCtx can run tests with this mock client
Added tests for methods in stateManagerCtx and fixed a bug in setWithTTL method
Issue reference
Please reference the issue this PR will close: #446
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: