-
Notifications
You must be signed in to change notification settings - Fork 41
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
Use redisFixture in all tests #244
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #244 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 85 85
Lines 5178 5178
Branches 487 487
=======================================
Hits 4876 4876
Misses 178 178
Partials 124 124 ☔ View full report in Codecov by Sentry. |
tests/Doc/HashExample.cs
Outdated
[SkipIfRedis(Is.OSSCluster)] | ||
public void run() | ||
{ | ||
var muxer = ConnectionMultiplexer.Connect("localhost:6379"); | ||
var db = muxer.GetDatabase(); | ||
var db = redisFixture.Redis.GetDatabase(); |
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.
I realized something: these tests inside Doc
might be written in such a way that the source code can be used inside documentation. I see there are special comments, like // REMOVE_START
and // REMOVE_END
, it looks like the source code is processed via some tool.
In that case, we should not use the fixture for these Doc
tests, because the sample code would not work if someone tries to use it as-such.
Use redisFixture in all tests like this:
instead of this:
This allows us more control over the tests, such as setting a default value for the connection and the ability to test on a variety of connections/ports