Skip to content

Commit

Permalink
Merge pull request redis#1743 from nigelis/bugfix/tests
Browse files Browse the repository at this point in the history
Use the right redis client in tests
  • Loading branch information
vmihailenco authored Apr 29, 2021
2 parents b45fc83 + a57742d commit 7d319ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4686,7 +4686,7 @@ var _ = Describe("Commands", func() {
client.ConfigSet(ctx, key, "0")
defer client.ConfigSet(ctx, key, old[1].(string))

err := rdb.Do(ctx, "slowlog", "reset").Err()
err := client.Do(ctx, "slowlog", "reset").Err()
Expect(err).NotTo(HaveOccurred())

client.Set(ctx, "test", "true", 0)
Expand Down
6 changes: 3 additions & 3 deletions redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
})
Expand Down

0 comments on commit 7d319ae

Please sign in to comment.