Add info command (#145)

* 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

* Add info command

* Record the number of clients in the current Godis server

* Add info command
This commit is contained in:
bjr
2023-03-29 08:12:53 +08:00
committed by GitHub
parent 11c0385241
commit 2578cbfcef
6 changed files with 102 additions and 44 deletions

View File

@@ -46,6 +46,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", "client"))
asserts.AssertNotError(t, ret)
ret = testServer.Exec(c, utils.ToCmdLine("INFO", "cluster"))
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"))