1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Refactor Set, SetNX and SetXX with expiration.

This commit is contained in:
Vladimir Mihailenco
2015-01-31 11:08:56 +02:00
parent d363cc72c5
commit 2dc61d458a
10 changed files with 182 additions and 89 deletions

View File

@ -167,7 +167,7 @@ var _ = Describe("Cluster", func() {
Expect(err).To(Equal(redis.Nil))
Expect(val).To(Equal(""))
val, err = client.Set("A", "VALUE").Result()
val, err = client.Set("A", "VALUE", 0).Result()
Expect(err).NotTo(HaveOccurred())
Expect(val).To(Equal("OK"))
@ -181,7 +181,7 @@ var _ = Describe("Cluster", func() {
})
It("should follow redirects", func() {
Expect(client.Set("A", "VALUE").Err()).NotTo(HaveOccurred())
Expect(client.Set("A", "VALUE", 0).Err()).NotTo(HaveOccurred())
Expect(redis.HashSlot("A")).To(Equal(6373))
// Slot 6373 is stored on the second node