Explorar o código

chore: add more tests (#2794)

Kevin Wan %!s(int64=2) %!d(string=hai) anos
pai
achega
963b52fb1b
Modificáronse 2 ficheiros con 613 adicións e 438 borrados
  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)
 }
 
-// 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.
 func (s *Redis) ZaddCtx(ctx context.Context, key string, score int64, value string) (
 	val bool, err error) {
 	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.
 func (s *Redis) ZaddFloatCtx(ctx context.Context, key string, score float64, value string) (
 	val bool, err error) {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 608 - 433
core/stores/redis/redis_test.go


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio