go-redis / redismock

Redis client Mock
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
284 stars 63 forks source link

ExpectScanType does not work #93

Open LeoNdV001 opened 1 month ago

LeoNdV001 commented 1 month ago
rdbClient, rdbClientMock = redismock.NewClientMock()

// doesn't work
rdbClientMock.ExpectScanType(0, "u:*:f", 1000, "zset").SetVal([]string{fmt.Sprintf("u:%d:f", 1)}, 1)

// doesn't work
rdbClientMock.ExpectScanType(0, "u:*:f", 1000, "zset").SetErr(nil)

redis gives an error: parameters do not match, expectation '[multi]', but call to cmd '[scan 0 match u:*:f count 1000 type zset]'