From cd030da543257cbaa8e83efa8f58f7733645555d Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Mon, 1 Jan 2024 22:41:37 +0200 Subject: [PATCH] add tests --- commands_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/commands_test.go b/commands_test.go index 4e9cf195d..af8b0c62f 100644 --- a/commands_test.go +++ b/commands_test.go @@ -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() {