miniredis icon indicating copy to clipboard operation
miniredis copied to clipboard

ZRANDMEMBER not supported

Open hcoura opened this issue 4 years ago • 3 comments

When testing something like

res, err := c.RedisClient.ZRandMember(ctx, c.GetFullKey(key), 1, false).Result()

err is ERR unknown command 'zrandmember', with args beginning with: ...

Using github.com/alicebob/miniredis/v2 v2.15.1

hcoura avatar Oct 05 '21 19:10 hcoura

res, err := c.RedisClient.ZRandMember(ctx, c.GetFullKey(key), 1, false).Result()

Thanks for the issue, and good point, we missed that command. I'll see if I can add add it soonish, but PRs are also accepted :)

alicebob avatar Oct 06 '21 09:10 alicebob

Added it in the PR linked above. Will review/merge it in a few days.

alicebob avatar Oct 13 '21 11:10 alicebob

Awesome! I never managed to get time to contribute unfortunately

hcoura avatar Oct 13 '21 13:10 hcoura