@@ -2486,21 +2486,25 @@ var _ = Describe("Commands", func() {
2486
2486
})
2487
2487
2488
2488
It ("should HExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2489
- res , err := client .HExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2489
+ resEmpty , err := client .HExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2490
2490
Expect (err ).To (BeNil ())
2491
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2492
+
2491
2493
for i := 0 ; i < 100 ; i ++ {
2492
2494
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2493
2495
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2494
2496
}
2495
2497
2496
- res , err = client .HExpire (ctx , "myhash" , 10 , "key1" , "key2" , "key200" ).Result ()
2498
+ res , err : = client .HExpire (ctx , "myhash" , 10 , "key1" , "key2" , "key200" ).Result ()
2497
2499
Expect (err ).NotTo (HaveOccurred ())
2498
2500
Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
2499
2501
})
2500
2502
2501
2503
It ("should HPExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2502
- _ , err := client .HPExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2504
+ resEmpty , err := client .HPExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2503
2505
Expect (err ).To (BeNil ())
2506
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2507
+
2504
2508
for i := 0 ; i < 100 ; i ++ {
2505
2509
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2506
2510
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2512,9 +2516,10 @@ var _ = Describe("Commands", func() {
2512
2516
})
2513
2517
2514
2518
It ("should HExpireAt" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2515
-
2516
- _ , err := client .HExpireAt (ctx , "no_such_key" , time .Now ().Add (10 * time .Second ), "field1" , "field2" , "field3" ).Result ()
2519
+ resEmpty , err := client .HExpireAt (ctx , "no_such_key" , time .Now ().Add (10 * time .Second ), "field1" , "field2" , "field3" ).Result ()
2517
2520
Expect (err ).To (BeNil ())
2521
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2522
+
2518
2523
for i := 0 ; i < 100 ; i ++ {
2519
2524
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2520
2525
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2526,9 +2531,10 @@ var _ = Describe("Commands", func() {
2526
2531
})
2527
2532
2528
2533
It ("should HPExpireAt" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2529
-
2530
- _ , err := client .HPExpireAt (ctx , "no_such_key" , time .Now ().Add (10 * time .Second ), "field1" , "field2" , "field3" ).Result ()
2534
+ resEmpty , err := client .HPExpireAt (ctx , "no_such_key" , time .Now ().Add (10 * time .Second ), "field1" , "field2" , "field3" ).Result ()
2531
2535
Expect (err ).To (BeNil ())
2536
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2537
+
2532
2538
for i := 0 ; i < 100 ; i ++ {
2533
2539
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2534
2540
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2540,9 +2546,10 @@ var _ = Describe("Commands", func() {
2540
2546
})
2541
2547
2542
2548
It ("should HPersist" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2543
-
2544
- _ , err := client .HPersist (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2549
+ resEmpty , err := client .HPersist (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2545
2550
Expect (err ).To (BeNil ())
2551
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2552
+
2546
2553
for i := 0 ; i < 100 ; i ++ {
2547
2554
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2548
2555
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2562,9 +2569,10 @@ var _ = Describe("Commands", func() {
2562
2569
})
2563
2570
2564
2571
It ("should HExpireTime" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2565
-
2566
- _ , err := client .HExpireTime (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2572
+ resEmpty , err := client .HExpireTime (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2567
2573
Expect (err ).To (BeNil ())
2574
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2575
+
2568
2576
for i := 0 ; i < 100 ; i ++ {
2569
2577
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2570
2578
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2580,9 +2588,10 @@ var _ = Describe("Commands", func() {
2580
2588
})
2581
2589
2582
2590
It ("should HPExpireTime" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2583
-
2584
- _ , err := client .HPExpireTime (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2591
+ resEmpty , err := client .HPExpireTime (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2585
2592
Expect (err ).To (BeNil ())
2593
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2594
+
2586
2595
for i := 0 ; i < 100 ; i ++ {
2587
2596
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2588
2597
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2599,9 +2608,10 @@ var _ = Describe("Commands", func() {
2599
2608
})
2600
2609
2601
2610
It ("should HTTL" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2602
-
2603
- _ , err := client .HTTL (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2611
+ resEmpty , err := client .HTTL (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2604
2612
Expect (err ).To (BeNil ())
2613
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2614
+
2605
2615
for i := 0 ; i < 100 ; i ++ {
2606
2616
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2607
2617
Expect (sadd .Err ()).NotTo (HaveOccurred ())
@@ -2617,9 +2627,10 @@ var _ = Describe("Commands", func() {
2617
2627
})
2618
2628
2619
2629
It ("should HPTTL" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2620
-
2621
- _ , err := client .HPTTL (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2630
+ resEmpty , err := client .HPTTL (ctx , "no_such_key" , "field1" , "field2" , "field3" ).Result ()
2622
2631
Expect (err ).To (BeNil ())
2632
+ Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2633
+
2623
2634
for i := 0 ; i < 100 ; i ++ {
2624
2635
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2625
2636
Expect (sadd .Err ()).NotTo (HaveOccurred ())
0 commit comments