diff options
Diffstat (limited to 'tests/unit/introspection.tcl')
-rw-r--r-- | tests/unit/introspection.tcl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index 10d3a15e9..c8bc3eb89 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -325,6 +325,31 @@ start_server {tags {"introspection"}} { } } + test {CLIENT SETINFO can set a library name to this connection} { + r CLIENT SETINFO lib-name redis.py + r CLIENT SETINFO lib-ver 1.2.3 + r client info + } {*lib-name=redis.py lib-ver=1.2.3*} + + test {CLIENT SETINFO invalid args} { + assert_error {*wrong number of arguments*} {r CLIENT SETINFO lib-name} + assert_match {*cannot contain spaces*} [r CLIENT SETINFO lib-name "redis py"] + assert_match {*newlines*} [r CLIENT SETINFO lib-name "redis.py\n"] + assert_match {*Unrecognized*} [r CLIENT SETINFO badger hamster] + # test that all of these didn't affect the previously set values + r client info + } {*lib-name=redis.py lib-ver=1.2.3*} + + test {RESET doesn NOT clean library name} { + r reset + r client info + } {*lib-name=redis.py*} + + test {CLIENT SETINFO can clear library name} { + r CLIENT SETINFO lib-name "" + r client info + } {*lib-name= *} + test {CONFIG save params special case handled properly} { # No "save" keyword - defaults should apply start_server {config "minimal.conf"} { |