Skip to content

Commit 171b83a

Browse files
Merge branch 'master' into DOC-4494-set-cmd-examples
2 parents c2d224e + 40e049e commit 171b83a

File tree

23 files changed

+327
-103
lines changed

23 files changed

+327
-103
lines changed

commands_test.go

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,59 @@ var _ = Describe("Commands", func() {
532532
Expect(info.Val()).To(HaveLen(1))
533533
})
534534

535+
It("should Info Modules", Label("redis.info"), func() {
536+
SkipBeforeRedisMajor(8, "modules are included in info for Redis Version >= 8")
537+
info := client.Info(ctx)
538+
Expect(info.Err()).NotTo(HaveOccurred())
539+
Expect(info.Val()).NotTo(BeNil())
540+
541+
info = client.Info(ctx, "search")
542+
Expect(info.Err()).NotTo(HaveOccurred())
543+
Expect(info.Val()).To(ContainSubstring("search"))
544+
545+
info = client.Info(ctx, "modules")
546+
Expect(info.Err()).NotTo(HaveOccurred())
547+
Expect(info.Val()).To(ContainSubstring("search"))
548+
Expect(info.Val()).To(ContainSubstring("ReJSON"))
549+
Expect(info.Val()).To(ContainSubstring("timeseries"))
550+
Expect(info.Val()).To(ContainSubstring("bf"))
551+
552+
info = client.Info(ctx, "everything")
553+
Expect(info.Err()).NotTo(HaveOccurred())
554+
Expect(info.Val()).To(ContainSubstring("search"))
555+
Expect(info.Val()).To(ContainSubstring("ReJSON"))
556+
Expect(info.Val()).To(ContainSubstring("timeseries"))
557+
Expect(info.Val()).To(ContainSubstring("bf"))
558+
})
559+
560+
It("should InfoMap Modules", Label("redis.info"), func() {
561+
SkipBeforeRedisMajor(8, "modules are included in info for Redis Version >= 8")
562+
info := client.InfoMap(ctx)
563+
Expect(info.Err()).NotTo(HaveOccurred())
564+
Expect(info.Val()).NotTo(BeNil())
565+
566+
info = client.InfoMap(ctx, "search")
567+
Expect(info.Err()).NotTo(HaveOccurred())
568+
Expect(len(info.Val())).To(BeNumerically(">=", 2))
569+
Expect(info.Val()["search_version"]).ToNot(BeNil())
570+
571+
info = client.InfoMap(ctx, "modules")
572+
Expect(info.Err()).NotTo(HaveOccurred())
573+
val := info.Val()
574+
modules, ok := val["Modules"]
575+
Expect(ok).To(BeTrue())
576+
Expect(len(val)).To(BeNumerically(">=", 2))
577+
Expect(val["search_version"]).ToNot(BeNil())
578+
Expect(modules["search"]).ToNot(BeNil())
579+
Expect(modules["ReJSON"]).ToNot(BeNil())
580+
Expect(modules["timeseries"]).ToNot(BeNil())
581+
Expect(modules["bf"]).ToNot(BeNil())
582+
583+
info = client.InfoMap(ctx, "everything")
584+
Expect(info.Err()).NotTo(HaveOccurred())
585+
Expect(len(info.Val())).To(BeNumerically(">=", 10))
586+
})
587+
535588
It("should Info cpu", func() {
536589
info := client.Info(ctx, "cpu")
537590
Expect(info.Err()).NotTo(HaveOccurred())

example/del-keys-without-ttl/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
)
1111

1212
require (
13-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
13+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1414
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
1515
go.uber.org/atomic v1.10.0 // indirect
1616
go.uber.org/multierr v1.9.0 // indirect

example/del-keys-without-ttl/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
22
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
33
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
4-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
5-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
4+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
5+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
66
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
77
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
88
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

example/hll/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ replace github.com/redis/go-redis/v9 => ../..
77
require github.com/redis/go-redis/v9 v9.6.2
88

99
require (
10-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
10+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1111
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
1212
)

example/hll/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
22
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
3-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
4-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
3+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
4+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
55
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
66
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

example/lua-scripting/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ replace github.com/redis/go-redis/v9 => ../..
77
require github.com/redis/go-redis/v9 v9.6.2
88

99
require (
10-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
10+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1111
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
1212
)

example/lua-scripting/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
22
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
3-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
4-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
3+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
4+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
55
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
66
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

example/otel/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717

1818
require (
1919
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
20-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
20+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2121
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
2222
github.com/go-logr/logr v1.4.1 // indirect
2323
github.com/go-logr/stdr v1.2.2 // indirect

example/otel/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
22
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
33
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
44
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
5-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
6-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
5+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
6+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
77
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
88
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
99
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

example/redis-bloom/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ replace github.com/redis/go-redis/v9 => ../..
77
require github.com/redis/go-redis/v9 v9.6.2
88

99
require (
10-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
10+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1111
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
1212
)

0 commit comments

Comments
 (0)