Create a testStore per test

This commit is contained in:
Juan Calderon-Perez
2023-10-29 20:24:11 -04:00
parent 2143a67c8d
commit 0b9f4aebc8
2 changed files with 48 additions and 16 deletions

View File

@@ -121,12 +121,12 @@ func (s *Storage) Conn() redis.UniversalClient {
func (s *Storage) Keys() ([][]byte, error) {
var keys [][]byte
var cursor uint64
var err error
for {
var batch []string
var err error
batch, cursor, err = s.db.Scan(context.Background(), cursor, "*", 10).Result()
if err != nil {
if batch, cursor, err = s.db.Scan(context.Background(), cursor, "*", 10).Result(); err != nil {
return nil, err
}