mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add Suffix support to default client set info (#2852)
* Add Suffix support to defualt client set info * Change ClientNameSuffix to IdentitySuffix * add tests
This commit is contained in:
@ -291,6 +291,17 @@ var _ = Describe("Commands", func() {
|
||||
}()
|
||||
pipe.ClientSetInfo(ctx, libInfo)
|
||||
}).To(Panic())
|
||||
// Test setting the default options for libName, libName suffix and libVer
|
||||
clientInfo := client.ClientInfo(ctx).Val()
|
||||
Expect(clientInfo.LibName).To(ContainSubstring("go-redis(go-redis,"))
|
||||
// Test setting the libName suffix in options
|
||||
opt := redisOptions()
|
||||
opt.IdentitySuffix = "suffix"
|
||||
client2 := redis.NewClient(opt)
|
||||
defer client2.Close()
|
||||
clientInfo = client2.ClientInfo(ctx).Val()
|
||||
Expect(clientInfo.LibName).To(ContainSubstring("go-redis(suffix,"))
|
||||
|
||||
})
|
||||
|
||||
It("should ConfigGet", func() {
|
||||
|
Reference in New Issue
Block a user