Add the keyspace section of the info command

This commit is contained in:
bijingrui
2023-05-28 22:09:56 +08:00
committed by finley
parent 7eaaf919f4
commit 3b9c4238fb
4 changed files with 63 additions and 20 deletions

View File

@@ -52,8 +52,10 @@ func TestInfo(t *testing.T) {
asserts.AssertNotError(t, ret)
ret = testServer.Exec(c, utils.ToCmdLine("iNFO", "SeRvEr"))
asserts.AssertNotError(t, ret)
ret = testServer.Exec(c, utils.ToCmdLine("INFO", "Keyspace"))
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)
asserts.AssertErrReply(t, ret, "Invalid section for 'info' command")
}