1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

chore(tests): validate keys are in different slots

This commit is contained in:
Nedyalko Dyakov
2025-06-18 11:07:48 +03:00
parent c22db9a297
commit 33aecb8350

View File

@ -598,6 +598,7 @@ var _ = Describe("ClusterClient", func() {
It("returns CrossSlot error", func() {
pipe.Set(ctx, "A{s}", "A_value", 0)
pipe.Set(ctx, "B{t}", "B_value", 0)
Expect(hashtag.Slot("A{s}")).NotTo(Equal(hashtag.Slot("B{t}")))
_, err := pipe.Exec(ctx)
Expect(err).To(MatchError(redis.ErrCrossSlot))
})