Add tests for stateManagerCtx#558
Conversation
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Codecov Report❌ 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. 🚀 New features to boost your workflow:
|
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
mikeee
left a comment
There was a problem hiding this comment.
Great stuff, just a few initial comments from my first look.
- Would you be able to include tests for the deprecated
statemanagermethods 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 <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
This reverts commit 9481caf. Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
|
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 <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
|
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 <chiahaohsu9@gmail.com>
|
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 <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
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: