Skip to content

Commit

Permalink
fix lpop err message to keep in parity with redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Kripu77 committed Jan 19, 2025
1 parent 530590a commit 7e2e9af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/eval/eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3957,11 +3957,11 @@ func testEvalLPOP(t *testing.T, store *dstore.Store) {
},
"non-integer count": {
input: []string{"k", "abc"},
migratedOutput: EvalResponse{Result: nil, Error: errors.New("ERR value is not an integer or a float")},
migratedOutput: EvalResponse{Result: nil, Error: errors.New("value is out of range, must be positive")},
},
"negative count": {
input: []string{"k", "-1"},
migratedOutput: EvalResponse{Result: nil, Error: errors.New("ERR value is not an integer or out of range")},
migratedOutput: EvalResponse{Result: nil, Error: errors.New("value is out of range, must be positive")},
},
"key with different type": {
setup: func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/eval/store_eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -3198,7 +3198,7 @@ func popElements(args []string, store *dstore.Store, direction string) *EvalResp
if err != nil {
return &EvalResponse{
Result: nil,
Error: diceerrors.ErrInvalidNumberFormat,
Error: diceerrors.ErrValueMustBePositive,
}
}
if nos == 0 {
Expand Down

0 comments on commit 7e2e9af

Please sign in to comment.