]> git.saurik.com Git - redis.git/blame - tests/unit/introspection.tcl
Ziplist encoding now tested with negative integers as well.
[redis.git] / tests / unit / introspection.tcl
CommitLineData
3ae5a308 1start_server {tags {"introspection"}} {
2 test {CLIENT LIST} {
3 r client list
09f66a0b 4 } {*addr=*:* fd=* age=* idle=* flags=N db=9 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=* obl=0 oll=0 omem=0 events=r cmd=client*}
4ce22375 5
6 test {MONITOR can log executed commands} {
7 set rd [redis_deferring_client]
8 $rd monitor
9 r set foo bar
10 r get foo
11 list [$rd read] [$rd read] [$rd read]
12 } {*OK*"set" "foo"*"get" "foo"*}
13
14 test {MONITOR can log commands issued by the scripting engine} {
15 set rd [redis_deferring_client]
16 $rd monitor
17 r eval {redis.call('set',KEYS[1],ARGV[1])} 1 foo bar
18 $rd read ;# Discard the OK
19 assert_match {*eval*} [$rd read]
20 assert_match {*lua*"set"*"foo"*"bar"*} [$rd read]
21 }
3ae5a308 22}