-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement adapter Name and add Name constant #85
Conversation
d315d7d
to
c659aa2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 82.81% 83.45% +0.64%
==========================================
Files 1 1
Lines 128 133 +5
==========================================
+ Hits 106 111 +5
Misses 19 19
Partials 3 3
☔ View full report in Codecov by Sentry. |
can you fix the code coverage? |
not really as it won't anyway correctly cover that case then, I can remove MustOpen :) |
you can do unit test trick like extracting the panic checking code |
I don't see reason to simulate code coverage percentage when actual case is not really checked |
it's to maintain code coverage what we do here is unit test, so IMO it's acceptable to do that, in fact we should make the code unit testable and sometimes it's required repeated refactoring we must do actual case test when we are responsible for the logic, but for opening connection and etc, it's implemented by driver (and they are responsible for it) so it's okay to just simulate it |
IMO, this is not much different than when we mock functions to do unit test |
Fixed it a bit different by mocking db.Open and this way actually kind a testing that code path |
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, Thanks
I really appreciate this
No description provided.