@@ -2626,6 +2626,23 @@ var _ = Describe("Commands", func() {
2626
2626
))
2627
2627
})
2628
2628
2629
+ It ("should HStrLen" , func () {
2630
+ hSet := client .HSet (ctx , "hash" , "key" , "hello" )
2631
+ Expect (hSet .Err ()).NotTo (HaveOccurred ())
2632
+
2633
+ hStrLen := client .HStrLen (ctx , "hash" , "key" )
2634
+ Expect (hStrLen .Err ()).NotTo (HaveOccurred ())
2635
+ Expect (hStrLen .Val ()).To (Equal (int64 (len ("hello" ))))
2636
+
2637
+ nonHStrLen := client .HStrLen (ctx , "hash" , "keyNon" )
2638
+ Expect (hStrLen .Err ()).NotTo (HaveOccurred ())
2639
+ Expect (nonHStrLen .Val ()).To (Equal (int64 (0 )))
2640
+
2641
+ hDel := client .HDel (ctx , "hash" , "key" )
2642
+ Expect (hDel .Err ()).NotTo (HaveOccurred ())
2643
+ Expect (hDel .Val ()).To (Equal (int64 (1 )))
2644
+ })
2645
+
2629
2646
It ("should HExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2630
2647
SkipBeforeRedisVersion (7.4 , "doesn't work with older redis stack images" )
2631
2648
res , err := client .HExpire (ctx , "no_such_key" , 10 * time .Second , "field1" , "field2" , "field3" ).Result ()
@@ -2642,6 +2659,7 @@ var _ = Describe("Commands", func() {
2642
2659
Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
2643
2660
})
2644
2661
2662
+
2645
2663
It ("should HPExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2646
2664
SkipBeforeRedisVersion (7.4 , "doesn't work with older redis stack images" )
2647
2665
res , err := client .HPExpire (ctx , "no_such_key" , 10 * time .Second , "field1" , "field2" , "field3" ).Result ()
0 commit comments