mirror of https://github.com/go-redis/redis.git
Change redis version from 7.2 to 7.4 in makefile (#3034)
* Change redis version from 7.2 to 7.4 * fix jsonGet test * Add 'watch' to client info * Remove jsonGet from Enterprise tests
This commit is contained in:
parent
f752b9a9d5
commit
2a3de7e1fc
2
Makefile
2
Makefile
|
@ -31,7 +31,7 @@ build:
|
|||
|
||||
testdata/redis:
|
||||
mkdir -p $@
|
||||
wget -qO- https://download.redis.io/releases/redis-7.2.1.tar.gz | tar xvz --strip-components=1 -C $@
|
||||
wget -qO- https://download.redis.io/releases/redis-7.4-rc1.tar.gz | tar xvz --strip-components=1 -C $@
|
||||
|
||||
testdata/redis/src/redis-server: testdata/redis
|
||||
cd $< && make all
|
||||
|
|
|
@ -4997,6 +4997,7 @@ type ClientInfo struct {
|
|||
PSub int // number of pattern matching subscriptions
|
||||
SSub int // redis version 7.0.3, number of shard channel subscriptions
|
||||
Multi int // number of commands in a MULTI/EXEC context
|
||||
Watch int // redis version 7.4 RC1, number of keys this client is currently watching.
|
||||
QueryBuf int // qbuf, query buffer length (0 means no query pending)
|
||||
QueryBufFree int // qbuf-free, free space of the query buffer (0 means the buffer is full)
|
||||
ArgvMem int // incomplete arguments for the next command (already extracted from query buffer)
|
||||
|
@ -5149,6 +5150,8 @@ func parseClientInfo(txt string) (info *ClientInfo, err error) {
|
|||
info.SSub, err = strconv.Atoi(val)
|
||||
case "multi":
|
||||
info.Multi, err = strconv.Atoi(val)
|
||||
case "watch":
|
||||
info.Watch, err = strconv.Atoi(val)
|
||||
case "qbuf":
|
||||
info.QueryBuf, err = strconv.Atoi(val)
|
||||
case "qbuf-free":
|
||||
|
|
|
@ -242,18 +242,18 @@ var _ = Describe("JSON Commands", Label("json"), func() {
|
|||
Expect(cmd.Val()).To(Equal("OK"))
|
||||
})
|
||||
|
||||
It("should JSONGet", Label("json.get", "json"), func() {
|
||||
It("should JSONGet", Label("json.get", "json", "NonRedisEnterprise"), func() {
|
||||
res, err := client.JSONSet(ctx, "get3", "$", `{"a": 1, "b": 2}`).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res).To(Equal("OK"))
|
||||
|
||||
res, err = client.JSONGetWithArgs(ctx, "get3", &redis.JSONGetArgs{Indent: "-"}).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res).To(Equal(`[-{--"a":1,--"b":2-}]`))
|
||||
Expect(res).To(Equal(`{-"a":1,-"b":2}`))
|
||||
|
||||
res, err = client.JSONGetWithArgs(ctx, "get3", &redis.JSONGetArgs{Indent: "-", Newline: `~`, Space: `!`}).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res).To(Equal(`[~-{~--"a":!1,~--"b":!2~-}~]`))
|
||||
Expect(res).To(Equal(`{~-"a":!1,~-"b":!2~}`))
|
||||
})
|
||||
|
||||
It("should JSONMerge", Label("json.merge", "json"), func() {
|
||||
|
|
Loading…
Reference in New Issue