]> git.saurik.com Git - redis.git/blobdiff - tests/unit/scripting.tcl
redis-trib: reshard command work in progress
[redis.git] / tests / unit / scripting.tcl
index 1735b264e997763d3cb7567bbc83f29dc192ba9b..d8a2e023e2216ab664951dabae628ab15d8da211 100644 (file)
@@ -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