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. (cherry picked from commit 9ce8c54d74f40bc5a70f210c2b14cf89c031ee10)
This commit is contained in:
parent
9e505e6cd8
commit
0b2cbf138e
@ -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"
|
||||
}
|
||||
]
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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_*]
|
||||
|
Loading…
x
Reference in New Issue
Block a user