COMMAND DOCS shows module name, where applicable (#10544)

Add field to COMMAND DOCS response to denote the name of the module
that added that command.
COMMAND LIST can filter by module, but if you get the full commands list,
you may still wanna know which command belongs to which module.
The alternative would be to do MODULE LIST, and then multiple calls to COMMAND LIST
This commit is contained in:
guybe7
2022-04-10 11:41:31 +03:00
committed by GitHub
parent 6cb5cbb28f
commit 719db14ec7
5 changed files with 17 additions and 2 deletions
@@ -36,6 +36,7 @@ start_server {tags {"modules"}} {
# Compare the maps. We need to pop "group" first.
dict unset redis_reply group
dict unset module_reply group
dict unset module_reply module
assert_equal $redis_reply $module_reply
}
+2 -2
View File
@@ -15,8 +15,8 @@ start_server {tags {"modules"}} {
set docs_reply [r command docs subcommands.bitarray]
set docs [dict create {*}[lindex $docs_reply 1]]
set subcmds_in_cmd_docs [dict create {*}[dict get $docs subcommands]]
assert_equal [dict get $subcmds_in_cmd_docs "subcommands.bitarray|get"] {group module}
assert_equal [dict get $subcmds_in_cmd_docs "subcommands.bitarray|set"] {group module}
assert_equal [dict get $subcmds_in_cmd_docs "subcommands.bitarray|get"] {group module module subcommands}
assert_equal [dict get $subcmds_in_cmd_docs "subcommands.bitarray|set"] {group module module subcommands}
}
test "Module pure-container command fails on arity error" {