Update sort_ro reply_schema to mention the null reply (#12534)

Also added a test to cover this case, so this can
cover the reply schemas check.
This commit is contained in:
Binbin 2023-08-31 11:36:35 +08:00 committed by GitHub
parent 7519960527
commit 9ce8c54d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View File

@ -150,7 +150,7 @@
"type": "string"
},
{
"description": "GET option is specified, but no object was found ",
"description": "GET option is specified, but no object was found",
"type": "null"
}
]

View File

@ -117,7 +117,15 @@
"description": "a list of sorted elements",
"type": "array",
"items": {
"type": "string"
"oneOf": [
{
"type": "string"
},
{
"description": "GET option is specified, but no object was found",
"type": "null"
}
]
}
}
}

View File

@ -75,12 +75,14 @@ start_server {
assert_equal [lsort -integer $result] [r sort tosort GET #]
} {} {cluster:skip}
test "SORT GET <const>" {
foreach command {SORT SORT_RO} {
test "$command GET <const>" {
r del foo
set res [r sort tosort GET foo]
set res [r $command tosort GET foo]
assert_equal 16 [llength $res]
foreach item $res { assert_equal {} $item }
} {} {cluster:skip}
}
test "SORT GET (key and hash) with sanity check" {
set l1 [r sort tosort GET # GET weight_*]