forked from mirror/redis
Use the right redis client in tests
This commit is contained in:
parent
5ed546f303
commit
eca1bb6b36
|
@ -4702,7 +4702,7 @@ var _ = Describe("Commands", func() {
|
|||
client.ConfigSet(ctx, key, "0")
|
||||
defer client.ConfigSet(ctx, key, old[key])
|
||||
|
||||
err := rdb.Do(ctx, "slowlog", "reset").Err()
|
||||
err := client.Do(ctx, "slowlog", "reset").Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
client.Set(ctx, "test", "true", 0)
|
||||
|
|
|
@ -290,18 +290,18 @@ var _ = Describe("Client", func() {
|
|||
|
||||
It("should set and scan time", func() {
|
||||
tm := time.Now()
|
||||
err := rdb.Set(ctx, "now", tm, 0).Err()
|
||||
err := client.Set(ctx, "now", tm, 0).Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
var tm2 time.Time
|
||||
err = rdb.Get(ctx, "now").Scan(&tm2)
|
||||
err = client.Get(ctx, "now").Scan(&tm2)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
Expect(tm2).To(BeTemporally("==", tm))
|
||||
})
|
||||
|
||||
It("should Conn", func() {
|
||||
err := rdb.Conn(ctx).Get(ctx, "this-key-does-not-exist").Err()
|
||||
err := client.Conn(ctx).Get(ctx, "this-key-does-not-exist").Err()
|
||||
Expect(err).To(Equal(redis.Nil))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue