mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Don't return an error when pipeline is empty
This commit is contained in:
@ -86,12 +86,12 @@ var _ = Describe("Tx", func() {
|
||||
Expect(get.Val()).To(Equal("hello2"))
|
||||
})
|
||||
|
||||
It("returns an error when there are no commands", func() {
|
||||
It("returns no error when there are no commands", func() {
|
||||
err := client.Watch(func(tx *redis.Tx) error {
|
||||
_, err := tx.Pipelined(func(redis.Pipeliner) error { return nil })
|
||||
return err
|
||||
})
|
||||
Expect(err).To(MatchError("redis: pipeline is empty"))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
v, err := client.Ping().Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user