mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Implement SetName and GetName
Allows setting and getting the client connection name. http://redis.io/commands/client-setname http://redis.io/commands/client-getname
This commit is contained in:
@ -90,6 +90,16 @@ var _ = Describe("Commands", func() {
|
||||
}, "1s").ShouldNot(HaveOccurred())
|
||||
})
|
||||
|
||||
It("should SetName", func() {
|
||||
isSet, err := client.SetName("theclientname").Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(isSet).To(Equal("OK"))
|
||||
|
||||
val, err := client.GetName().Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(val).To(Equal("theclientname"))
|
||||
})
|
||||
|
||||
It("should ConfigGet", func() {
|
||||
r := client.ConfigGet("*")
|
||||
Expect(r.Err()).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user