Skip to content

Commit 7d319ae

Browse files
authored
Merge pull request #1743 from nigelis/bugfix/tests
Use the right redis client in tests
2 parents b45fc83 + a57742d commit 7d319ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4686,7 +4686,7 @@ var _ = Describe("Commands", func() {
46864686
client.ConfigSet(ctx, key, "0")
46874687
defer client.ConfigSet(ctx, key, old[1].(string))
46884688

4689-
err := rdb.Do(ctx, "slowlog", "reset").Err()
4689+
err := client.Do(ctx, "slowlog", "reset").Err()
46904690
Expect(err).NotTo(HaveOccurred())
46914691

46924692
client.Set(ctx, "test", "true", 0)

redis_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,18 @@ var _ = Describe("Client", func() {
290290

291291
It("should set and scan time", func() {
292292
tm := time.Now()
293-
err := rdb.Set(ctx, "now", tm, 0).Err()
293+
err := client.Set(ctx, "now", tm, 0).Err()
294294
Expect(err).NotTo(HaveOccurred())
295295

296296
var tm2 time.Time
297-
err = rdb.Get(ctx, "now").Scan(&tm2)
297+
err = client.Get(ctx, "now").Scan(&tm2)
298298
Expect(err).NotTo(HaveOccurred())
299299

300300
Expect(tm2).To(BeTemporally("==", tm))
301301
})
302302

303303
It("should Conn", func() {
304-
err := rdb.Conn(ctx).Get(ctx, "this-key-does-not-exist").Err()
304+
err := client.Conn(ctx).Get(ctx, "this-key-does-not-exist").Err()
305305
Expect(err).To(Equal(redis.Nil))
306306
})
307307
})

0 commit comments

Comments
 (0)