Closed Jared-Prime closed 3 years ago
go-redis is constantly adding new methods to the interface. Feel free to submit a PR. However, this has happened enough times now that it's probably better having the mock encapsulate the interface, like:
type ClientMock struct {
mock.Mock
redis.Cmdable
client *redis.Client
}
At least this way new interface methods will result in a panic only if they are used, and not constantly break existing code like it does now.
also having the same issues.
auth/xxx.go:36:47: cannot use redisMock (type *redismock.ClientMock) as type redis.Cmdable in argument to auth.NewRedisTokenFetcher:
*redismock.ClientMock does not implement redis.Cmdable (missing ScanType method)
thanks @lilien1010 -- I appreciate you putting in the commit. Apologies for not doing it sooner
Using github.com/go-redis/redis/v8 v8.4.4, I get the following error