Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Jan 24, 2024
1 parent 58c6f9f commit 44739f6
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 9 deletions.
179 changes: 178 additions & 1 deletion src/commands/command.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,183 @@
],
"command_tips": [
"NONDETERMINISTIC_OUTPUT_ORDER"
]
],
"reply_schema": {
"type": "array",
"items": {
"oneOf": [
{
"description": "command does not exist",
"type": "null"
},
{
"description": "command info array output",
"type": "array",
"minItems": 10,
"maxItems": 10,
"items": [
{
"description": "command name",
"type": "string"
},
{
"description": "command arity",
"type": "integer"
},
{
"description": "command flags",
"type": "array",
"items": {
"description": "command flag",
"type": "string"
}
},
{
"description": "command first key index",
"type": "integer"
},
{
"description": "command last key index",
"type": "integer"
},
{
"description": "command key step index",
"type": "integer"
},
{
"description": "command categories",
"type": "array",
"items": {
"description": "command category",
"type": "string"
}
},
{
"description": "command tips",
"type": "array",
"items": {
"description": "command tip",
"type": "string"
}
},
{
"description": "command key specs",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"notes": {
"type": "string"
},
"flags": {
"type": "array",
"items": {
"type": "string"
}
},
"begin_search": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"spec": {
"anyOf": [
{
"description": "unknown type, empty map",
"type": "object",
"additionalProperties": false
},
{
"description": "index type",
"type": "object",
"additionalProperties": false,
"properties": {
"index": {
"type": "integer"
}
}
},
{
"description": "keyword type",
"type": "object",
"additionalProperties": false,
"properties": {
"keyword": {
"type": "string"
},
"startfrom": {
"type": "integer"
}
}
}
]
}
}
},
"find_keys": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"spec": {
"anyOf": [
{
"description": "unknown type",
"type": "object",
"additionalProperties": false
},
{
"description": "range type",
"type": "object",
"additionalProperties": false,
"properties": {
"lastkey": {
"type": "integer"
},
"keystep": {
"type": "integer"
},
"limit": {
"type": "integer"
}
}
},
{
"description": "keynum type",
"type": "object",
"additionalProperties": false,
"properties": {
"keynumidx": {
"type": "integer"
},
"firstkey": {
"type": "integer"
},
"keystep": {
"type": "integer"
}
}
}
]
}
}
}
}
}
},
{
"type": "array",
"description": "subcommands"
}
]
}
]
}
}
}
}
8 changes: 0 additions & 8 deletions tests/unit/introspection-2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ start_server {tags {"introspection"}} {
assert_match {*calls=1,*} [cmdstat geoadd]
} {} {needs:config-resetstat}

test {COMMAND} {
set res [r command]
puts "===================="
puts "11111"
puts $res
puts "2222"
}

test {COMMAND COUNT get total number of Redis commands} {
assert_morethan [r command count] 0
}
Expand Down

0 comments on commit 44739f6

Please sign in to comment.