瀏覽代碼

chore: add more tests (#2794)

Kevin Wan 2 年之前
父節點
當前提交
963b52fb1b
共有 2 個文件被更改,包括 613 次插入438 次删除
  1. 5 5
      core/stores/redis/redis.go
  2. 608 433
      core/stores/redis/redis_test.go

+ 5 - 5
core/stores/redis/redis.go

@@ -1897,17 +1897,17 @@ func (s *Redis) Zadd(key string, score int64, value string) (bool, error) {
 	return s.ZaddCtx(context.Background(), key, score, value)
 	return s.ZaddCtx(context.Background(), key, score, value)
 }
 }
 
 
-// ZaddFloat is the implementation of redis zadd command.
-func (s *Redis) ZaddFloat(key string, score float64, value string) (bool, error) {
-	return s.ZaddFloatCtx(context.Background(), key, score, value)
-}
-
 // ZaddCtx is the implementation of redis zadd command.
 // ZaddCtx is the implementation of redis zadd command.
 func (s *Redis) ZaddCtx(ctx context.Context, key string, score int64, value string) (
 func (s *Redis) ZaddCtx(ctx context.Context, key string, score int64, value string) (
 	val bool, err error) {
 	val bool, err error) {
 	return s.ZaddFloatCtx(ctx, key, float64(score), value)
 	return s.ZaddFloatCtx(ctx, key, float64(score), value)
 }
 }
 
 
+// ZaddFloat is the implementation of redis zadd command.
+func (s *Redis) ZaddFloat(key string, score float64, value string) (bool, error) {
+	return s.ZaddFloatCtx(context.Background(), key, score, value)
+}
+
 // ZaddFloatCtx is the implementation of redis zadd command.
 // ZaddFloatCtx is the implementation of redis zadd command.
 func (s *Redis) ZaddFloatCtx(ctx context.Context, key string, score float64, value string) (
 func (s *Redis) ZaddFloatCtx(ctx context.Context, key string, score float64, value string) (
 	val bool, err error) {
 	val bool, err error) {

文件差異過大導致無法顯示
+ 608 - 433
core/stores/redis/redis_test.go


部分文件因文件數量過多而無法顯示