Skip to content

Commit 0eb5e71

Browse files
committed
fixed bug
1 parent 0e3517c commit 0eb5e71

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

redis.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func NewRedisStore(opts *Options) session.ManagerStore {
2222
if opts == nil {
2323
panic("options cannot be nil")
2424
}
25-
return &managerStore{cli: redis.NewClient(opts.redisOptions())}
25+
return NewRedisStoreWithCli(redis.NewClient(opts.redisOptions()))
2626
}
2727

2828
// NewRedisStoreWithCli create an instance of a redis store
@@ -42,7 +42,7 @@ func NewRedisClusterStore(opts *ClusterOptions) session.ManagerStore {
4242
if opts == nil {
4343
panic("options cannot be nil")
4444
}
45-
return &managerStore{cli: redis.NewClusterClient(opts.redisClusterOptions())}
45+
return NewRedisClusterStoreWithCli(redis.NewClusterClient(opts.redisClusterOptions()))
4646
}
4747

4848
// NewRedisClusterStoreWithCli create an instance of a redis cluster store

redis_test.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ func TestStore(t *testing.T) {
2323
defer mstore.Close()
2424

2525
Convey("Test redis storage operation", t, func() {
26-
store, err := mstore.Create(context.Background(), "test_memory_store", 10)
27-
if err != nil {
28-
So(err, ShouldBeNil)
29-
}
26+
store, err := mstore.Create(context.Background(), "test_redis_store", 10)
27+
So(err, ShouldBeNil)
3028
foo, ok := store.Get("foo")
3129
So(ok, ShouldBeFalse)
3230
So(foo, ShouldBeNil)

0 commit comments

Comments
 (0)