From eca1bb6b36886b069cd96c8470044d6e3ea11bd5 Mon Sep 17 00:00:00 2001 From: nigel_li Date: Wed, 28 Apr 2021 14:39:03 +0800 Subject: [PATCH] Use the right redis client in tests --- commands_test.go | 2 +- redis_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands_test.go b/commands_test.go index fb492bf..f42792c 100644 --- a/commands_test.go +++ b/commands_test.go @@ -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) diff --git a/redis_test.go b/redis_test.go index bbfa4c1..9f18905 100644 --- a/redis_test.go +++ b/redis_test.go @@ -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)) }) })