mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-05 07:56:52 +08:00
Added wrong args tests for RENAME command.
This commit is contained in:
@@ -2442,6 +2442,21 @@ func Test_Generic(t *testing.T) {
|
||||
expectedResponse: "OK",
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
name: "4. Command too short",
|
||||
command: []resp.Value{resp.StringValue("RENAME"), resp.StringValue("key")},
|
||||
expectedError: errors.New(constants.WrongArgsResponse),
|
||||
},
|
||||
{
|
||||
name: "5. Command too long",
|
||||
command: []resp.Value{
|
||||
resp.StringValue("RENAME"),
|
||||
resp.StringValue("key"),
|
||||
resp.StringValue("newkey"),
|
||||
resp.StringValue("extra_arg"),
|
||||
},
|
||||
expectedError: errors.New(constants.WrongArgsResponse),
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user