mirror of
https://github.com/fluencelabs/redis
synced 2025-06-24 14:31:34 +00:00
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
This commit is contained in:
19
tests/unit/moduleapi/misc.tcl
Normal file
19
tests/unit/moduleapi/misc.tcl
Normal file
@ -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] }
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user