Unverified Commit 75c66fb0 authored by Wen Hui's avatar Wen Hui Committed by GitHub
Browse files

Update Sentinel Debug command json file and add test case for it (#11513)

Command SENTINEL DEBUG could be no arguments, which display all
configurable arguments and their values.
Update the command arguments in the docs (json file) to indicate that
arguments are optional
parent 3b462ce5
...@@ -3718,7 +3718,7 @@ struct redisCommandArg SENTINEL_DEBUG_data_Subargs[] = { ...@@ -3718,7 +3718,7 @@ struct redisCommandArg SENTINEL_DEBUG_data_Subargs[] = {
/* SENTINEL DEBUG argument table */ /* SENTINEL DEBUG argument table */
struct redisCommandArg SENTINEL_DEBUG_Args[] = { struct redisCommandArg SENTINEL_DEBUG_Args[] = {
{"data",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_MULTIPLE,.subargs=SENTINEL_DEBUG_data_Subargs}, {"data",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE,.subargs=SENTINEL_DEBUG_data_Subargs},
{0} {0}
}; };
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
{ {
"name": "data", "name": "data",
"type": "block", "type": "block",
"optional": true,
"multiple": true, "multiple": true,
"arguments": [ "arguments": [
{ {
......
source "../tests/includes/init-tests.tcl"
test "Sentinel debug test with arguments and without argument" {
set current_info_period [lindex [S 0 SENTINEL DEBUG] 1]
S 0 SENTINEL DEBUG info-period 8888
assert_equal {8888} [lindex [S 0 SENTINEL DEBUG] 1]
S 0 SENTINEL DEBUG info-period $current_info_period
assert_equal $current_info_period [lindex [S 0 SENTINEL DEBUG] 1]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment