diff options
author | Eduardo Semprebon <eduardobr@gmail.com> | 2021-08-09 08:40:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 09:40:29 +0300 |
commit | d3356bf614155f2a4352a0630065d715ce073b8a (patch) | |
tree | 8bdad343594943673ca7336e784a000c54df7569 /tests | |
parent | e8eeba7bee6add5286afc4d59db074a924fb9209 (diff) | |
download | redis-d3356bf614155f2a4352a0630065d715ce073b8a.tar.gz |
Add SORT_RO command (#9299)
Add a readonly variant of the STORE command, so it can be used on
read-only workloads (replica, ACL, etc)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/sort.tcl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/sort.tcl b/tests/unit/sort.tcl index a892c3a48..a9264eadf 100644 --- a/tests/unit/sort.tcl +++ b/tests/unit/sort.tcl @@ -263,6 +263,18 @@ start_server { r lrange testb 0 -1 } {5 3 4} {cluster:skip} + test "SORT_RO - Successful case" { + r del mylist + r lpush mylist a + r set x:a 100 + r sort_ro mylist by nosort get x:*-> + } {100} {cluster:skip} + + test "SORT_RO - Cannot run with STORE arg" { + catch {r sort_ro foolist STORE bar} e + set e + } {ERR syntax error} + tags {"slow"} { set num 100 set res [create_random_dataset $num lpush] |