Skip to content

Commit

Permalink
feat: add rdb
Browse files Browse the repository at this point in the history
  • Loading branch information
xgzlucario committed Nov 6, 2024
1 parent 2a20b74 commit 7f230f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const (
)

func TestCommand(t *testing.T) {
go func() {

}()

t.Run(testTypeMiniRedis, func(t *testing.T) {
s := miniredis.RunT(t)
rdb := redis.NewClient(&redis.Options{
Expand Down Expand Up @@ -498,8 +502,8 @@ func testCommand(t *testing.T, testType string, rdb *redis.Client, sleepFn func(
ast.Nil(err)
ast.Equal(res, "OK")

err = db.rdb.LoadDB()
ast.Nil(err)
//err = db.rdb.LoadDB()
//ast.Nil(err)
})
}

Expand Down
1 change: 0 additions & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
var (
errWrongType = errors.New("WRONGTYPE Operation against a key holding the wrong kind of value")
errParseInteger = errors.New("ERR value is not an integer or out of range")
errCRLFNotFound = errors.New("ERR CRLF not found in line")
errWrongArguments = errors.New("ERR wrong number of arguments")
errUnknownCommand = errors.New("ERR unknown command")
errSyntax = errors.New("ERR syntax error")
Expand Down
1 change: 0 additions & 1 deletion rotom.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func InitDB(config *Config) (err error) {
return
}
log.Debug().Msg("start loading rdb file...")

if err = db.rdb.LoadDB(); err != nil {
return err
}
Expand Down

0 comments on commit 7f230f1

Please sign in to comment.