mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-06 00:16:53 +08:00
Skip AOF command logging if ReadWriter is nil. Pass config to api test files to prevent aof data directory from being created everytime tests are executed.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -113,6 +113,10 @@ func NewAppendStore(options ...func(store *AppendStore)) *AppendStore {
|
||||
func (store *AppendStore) Write(command []byte) error {
|
||||
store.mut.Lock()
|
||||
defer store.mut.Unlock()
|
||||
// Skip operation if ReadWriter is not defined
|
||||
if store.rw == nil {
|
||||
return nil
|
||||
}
|
||||
// Add new line before writing to AOF file.
|
||||
out := append(command, []byte("\r\n")...)
|
||||
if _, err := store.rw.Write(out); err != nil {
|
||||
|
327310
pkg/echovault/aof/log.aof
327310
pkg/echovault/aof/log.aof
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,22 @@
|
||||
package echovault
|
||||
|
||||
import (
|
||||
"github.com/echovault/echovault/internal/config"
|
||||
"github.com/echovault/echovault/pkg/commands"
|
||||
"github.com/echovault/echovault/pkg/utils"
|
||||
"reflect"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEchoVault_HDEL(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -69,7 +77,13 @@ func TestEchoVault_HDEL(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HEXISTS(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -122,7 +136,13 @@ func TestEchoVault_HEXISTS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HGETALL(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -178,7 +198,13 @@ func TestEchoVault_HGETALL(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HINCRBY(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
const (
|
||||
HINCRBY = "HINCRBY"
|
||||
@@ -286,7 +312,13 @@ func TestEchoVault_HINCRBY(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HKEYS(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -340,7 +372,13 @@ func TestEchoVault_HKEYS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HLEN(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -389,7 +427,13 @@ func TestEchoVault_HLEN(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HRANDFIELD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -517,7 +561,13 @@ func TestEchoVault_HRANDFIELD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HSET(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -601,7 +651,13 @@ func TestEchoVault_HSET(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HSTRLEN(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -664,7 +720,13 @@ func TestEchoVault_HSTRLEN(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_HVALS(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@@ -2,13 +2,21 @@ package echovault
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/echovault/echovault/internal/config"
|
||||
"github.com/echovault/echovault/pkg/commands"
|
||||
"github.com/echovault/echovault/pkg/utils"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEchoVault_LLEN(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
preset bool
|
||||
@@ -61,7 +69,13 @@ func TestEchoVault_LLEN(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LINDEX(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
preset bool
|
||||
@@ -155,7 +169,13 @@ func TestEchoVault_LINDEX(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LMOVE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -321,7 +341,13 @@ func TestEchoVault_LMOVE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_POP(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -387,7 +413,13 @@ func TestEchoVault_POP(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LPUSH(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -458,7 +490,13 @@ func TestEchoVault_LPUSH(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_RPUSH(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -509,7 +547,13 @@ func TestEchoVault_RPUSH(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LRANGE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -624,7 +668,13 @@ func TestEchoVault_LRANGE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LREM(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -685,7 +735,13 @@ func TestEchoVault_LREM(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LSET(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -786,7 +842,13 @@ func TestEchoVault_LSET(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_LTRIM(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@@ -1,15 +1,23 @@
|
||||
package echovault
|
||||
|
||||
import (
|
||||
"github.com/echovault/echovault/internal/config"
|
||||
"github.com/echovault/echovault/internal/set"
|
||||
"github.com/echovault/echovault/pkg/commands"
|
||||
"github.com/echovault/echovault/pkg/utils"
|
||||
"reflect"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEchoVault_SADD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -62,7 +70,13 @@ func TestEchoVault_SADD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SCARD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -111,7 +125,13 @@ func TestEchoVault_SCARD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SDIFF(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -199,7 +219,13 @@ func TestEchoVault_SDIFF(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SDIFFSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -288,7 +314,13 @@ func TestEchoVault_SDIFFSTORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SINTER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -376,7 +408,13 @@ func TestEchoVault_SINTER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SINTERCARD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -476,7 +514,13 @@ func TestEchoVault_SINTERCARD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SINTERSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -565,7 +609,13 @@ func TestEchoVault_SINTERSTORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SISMEMBER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -618,7 +668,13 @@ func TestEchoVault_SISMEMBER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SMEMBERS(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -672,7 +728,13 @@ func TestEchoVault_SMEMBERS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SMISMEMBER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -744,7 +806,13 @@ func TestEchoVault_SMISMEMBER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SMOVE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -824,7 +892,13 @@ func TestEchoVault_SMOVE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SPOP(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -871,7 +945,13 @@ func TestEchoVault_SPOP(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SRANDMEMBER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -934,7 +1014,13 @@ func TestEchoVault_SRANDMEMBER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SREM(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -987,7 +1073,13 @@ func TestEchoVault_SREM(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SUNION(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1068,7 +1160,13 @@ func TestEchoVault_SUNION(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_SUNIONSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@@ -2,8 +2,10 @@ package echovault
|
||||
|
||||
import (
|
||||
"github.com/echovault/echovault/internal"
|
||||
"github.com/echovault/echovault/internal/config"
|
||||
"github.com/echovault/echovault/internal/sorted_set"
|
||||
"github.com/echovault/echovault/pkg/commands"
|
||||
"github.com/echovault/echovault/pkg/utils"
|
||||
"math"
|
||||
"reflect"
|
||||
"strconv"
|
||||
@@ -11,7 +13,13 @@ import (
|
||||
)
|
||||
|
||||
func TestEchoVault_ZADD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -231,7 +239,13 @@ func TestEchoVault_ZADD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZCARD(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -288,7 +302,13 @@ func TestEchoVault_ZCARD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZCOUNT(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -383,7 +403,13 @@ func TestEchoVault_ZCOUNT(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZDIFF(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -529,7 +555,13 @@ func TestEchoVault_ZDIFF(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZDIFFSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -644,7 +676,13 @@ func TestEchoVault_ZDIFFSTORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZINCRBY(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -788,7 +826,13 @@ func TestEchoVault_ZINCRBY(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZINTER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1095,7 +1139,13 @@ func TestEchoVault_ZINTER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZINTERSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1416,7 +1466,13 @@ func TestEchoVault_ZINTERSTORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZLEXCOUNT(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1503,7 +1559,13 @@ func TestEchoVault_ZLEXCOUNT(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZMPOP(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1653,7 +1715,13 @@ func TestEchoVault_ZMPOP(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZMSCORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1728,7 +1796,13 @@ func TestEchoVault_ZMSCORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZPOP(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1830,7 +1904,13 @@ func TestEchoVault_ZPOP(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZRANDMEMBER(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1900,7 +1980,13 @@ func TestEchoVault_ZRANDMEMBER(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZRANGE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2059,7 +2145,13 @@ func TestEchoVault_ZRANGE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZRANGESTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2267,7 +2359,13 @@ func TestEchoVault_ZRANGESTORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZRANK(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2360,7 +2458,13 @@ func TestEchoVault_ZRANK(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZREM(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2425,7 +2529,13 @@ func TestEchoVault_ZREM(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZREMRANGEBYSCORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2491,7 +2601,13 @@ func TestEchoVault_ZREMRANGEBYSCORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZSCORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2565,7 +2681,13 @@ func TestEchoVault_ZSCORE(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZUNION(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -2897,7 +3019,13 @@ func TestEchoVault_ZUNION(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEchoVault_ZUNIONSTORE(t *testing.T) {
|
||||
server := NewEchoVault(WithCommands(commands.All()))
|
||||
server := NewEchoVault(
|
||||
WithCommands(commands.All()),
|
||||
WithConfig(config.Config{
|
||||
DataDir: "",
|
||||
EvictionPolicy: utils.NoEviction,
|
||||
}),
|
||||
)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
Reference in New Issue
Block a user