mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 16:57:06 +08:00
Add info command (#141)
* Generate a new runid for each start of godis * Add info command * Add info command * Generate a new runid for each start of godis * Add unittests for the info command
This commit is contained in:
@@ -39,3 +39,17 @@ func TestAuth(t *testing.T) {
|
||||
asserts.AssertStatusReply(t, ret, "OK")
|
||||
|
||||
}
|
||||
|
||||
func TestInfo(t *testing.T) {
|
||||
c := connection.NewFakeConn()
|
||||
ret := testServer.Exec(c, utils.ToCmdLine("INFO"))
|
||||
asserts.AssertNotError(t, ret)
|
||||
ret = testServer.Exec(c, utils.ToCmdLine("INFO", "server"))
|
||||
asserts.AssertNotError(t, ret)
|
||||
ret = testServer.Exec(c, utils.ToCmdLine("iNFO", "SeRvEr"))
|
||||
asserts.AssertNotError(t, ret)
|
||||
ret = testServer.Exec(c, utils.ToCmdLine("iNFO", "abc", "bde"))
|
||||
asserts.AssertErrReply(t, ret, "ERR wrong number of arguments for 'info' command")
|
||||
ret = testServer.Exec(c, utils.ToCmdLine("INFO", "abc"))
|
||||
asserts.AssertNullBulk(t, ret)
|
||||
}
|
||||
|
Reference in New Issue
Block a user