Testing a Go Package That Depends on Redis

from blog Blog on hjr265.me, | ↗ original
Redsync, one of my open-source Go packages, implements a distributed lock using Redis. It is an implementation of the Redlock algorithm. This Go package has tests that run against multiple real Redis servers. And it is an example of how you can use the TestMain function to customize your Go tests. The TestMain function, if defined in your Go...