X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/61fee31999554aa2d223cff6a841be7730394131..73fac227a0dd3a7d25e29b4718f8588f55db07d6:/tests/unit/scripting.tcl?ds=inline diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index 1735b264..d8a2e023 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -123,6 +123,21 @@ start_server {tags {"scripting"}} { } e set _ $e } {*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"}} { @@ -141,7 +156,7 @@ start_server {tags {"scripting repl"}} { r evalsha ae3477e27be955de7e1bc9adfdca626b478d3cb2 0 } {2} - after 100 + if {$::valgrind} {after 2000} else {after 100} test {If EVALSHA was replicated as EVAL the slave should be ok} { r -1 get x