]> 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 15ea0d5ae9830912bd9458651df181dbb8f884ae..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"}} {