diff options
author | Oran Agra <oran@redislabs.com> | 2019-10-24 09:38:52 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2019-10-28 12:39:57 +0200 |
commit | 0399b5a27e3a41436fac77bad5a580f396fed365 (patch) | |
tree | ca8afffdaae67368c69773df9d030df814896bd9 /tests/unit/moduleapi/misc.tcl | |
parent | c328c807e7cef76db0fcf6fc2a58f62349489458 (diff) | |
download | redis-0399b5a27e3a41436fac77bad5a580f396fed365.tar.gz |
Module api tests for RM_Call
Adding a test for coverage for RM_Call in a new "misc" unit
to be used for various short simple tests
also solves compilation warnings in redismodule.h and fork.c
Diffstat (limited to 'tests/unit/moduleapi/misc.tcl')
-rw-r--r-- | tests/unit/moduleapi/misc.tcl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/moduleapi/misc.tcl b/tests/unit/moduleapi/misc.tcl new file mode 100644 index 000000000..d392aeab0 --- /dev/null +++ b/tests/unit/moduleapi/misc.tcl @@ -0,0 +1,19 @@ +set testmodule [file normalize tests/modules/misc.so] + + +start_server {tags {"modules"}} { + r module load $testmodule + + test {test RM_Call} { + set info [r test.call_info commandstats] + # cmdstat is not in a default section, so we also test an argument was passed + assert { [string match "*cmdstat_module*" $info] } + } + + test {test RM_Call args array} { + set info [r test.call_generic info commandstats] + # cmdstat is not in a default section, so we also test an argument was passed + assert { [string match "*cmdstat_module*" $info] } + } + +} |