mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 08:46:56 +08:00
tiny fixes
This commit is contained in:
@@ -31,6 +31,20 @@ func TestMulti(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSyntaxErr(t *testing.T) {
|
||||
conn := new(connection.FakeConn)
|
||||
testServer.Exec(conn, utils.ToCmdLine("FLUSHALL"))
|
||||
result := testServer.Exec(conn, utils.ToCmdLine("multi"))
|
||||
asserts.AssertNotError(t, result)
|
||||
result = testServer.Exec(conn, utils.ToCmdLine("set"))
|
||||
asserts.AssertErrReply(t, result, "ERR wrong number of arguments for 'set' command")
|
||||
testServer.Exec(conn, utils.ToCmdLine("get", "a"))
|
||||
result = testServer.Exec(conn, utils.ToCmdLine("exec"))
|
||||
asserts.AssertErrReply(t, result, "EXECABORT Transaction discarded because of previous errors.")
|
||||
result = testServer.Exec(conn, utils.ToCmdLine("get", "a"))
|
||||
asserts.AssertNotError(t, result)
|
||||
}
|
||||
|
||||
func TestRollback(t *testing.T) {
|
||||
conn := new(connection.FakeConn)
|
||||
testServer.Exec(conn, utils.ToCmdLine("FLUSHALL"))
|
||||
|
Reference in New Issue
Block a user