1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

feat: check pipeline.Do to prevent confusion with Exec (#2517)

Signed-off-by: monkey92t <golang@88.com>
This commit is contained in:
Monkey
2023-04-01 14:44:06 +08:00
committed by GitHub
parent e96c7b5f58
commit a388a637ed
2 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package redis_test
import (
"errors"
"strconv"
. "github.com/bsm/ginkgo/v2"
@ -84,6 +85,11 @@ var _ = Describe("pipelining", func() {
}
}
})
It("should Exec, not Do", func() {
err := pipe.Do(ctx).Err()
Expect(err).To(Equal(errors.New("redis: please enter the command to be executed")))
})
}
Describe("Pipeline", func() {