mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
new tests for the scripting engine: not allowed commands and write commands after random commands.
This commit is contained in:
parent
9f772cc237
commit
7864ef8551
@ -123,6 +123,21 @@ start_server {tags {"scripting"}} {
|
|||||||
} e
|
} e
|
||||||
set _ $e
|
set _ $e
|
||||||
} {*execution time*}
|
} {*execution time*}
|
||||||
|
|
||||||
|
test {EVAL - Scripts can't run certain commands} {
|
||||||
|
set e {}
|
||||||
|
catch {r eval {return redis.call('spop','x')} 0} e
|
||||||
|
set e
|
||||||
|
} {*not allowed*}
|
||||||
|
|
||||||
|
test {EVAL - Scripts can't run certain commands} {
|
||||||
|
set e {}
|
||||||
|
catch {
|
||||||
|
r eval "redis.call('randomkey'); return redis.call('set','x','ciao')" 0
|
||||||
|
} e
|
||||||
|
set e
|
||||||
|
} {*not allowed after*}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start_server {tags {"scripting repl"}} {
|
start_server {tags {"scripting repl"}} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user