add test for modules load/unload and config rewrite

This commit is contained in:
Oran Agra 2021-06-01 12:51:30 +03:00
parent 2ff53060d2
commit 7cb42c9c36
2 changed files with 23 additions and 0 deletions

View File

@ -19,6 +19,7 @@ $TCLSH tests/test_helper.tcl \
--single unit/moduleapi/fork \
--single unit/moduleapi/testrdb \
--single unit/moduleapi/infotest \
--single unit/moduleapi/infra \
--single unit/moduleapi/propagate \
--single unit/moduleapi/hooks \
--single unit/moduleapi/misc \

View File

@ -0,0 +1,22 @@
set testmodule [file normalize tests/modules/infotest.so]
test {modules config rewrite} {
start_server {tags {"modules"}} {
r module load $testmodule
assert_equal [lindex [lindex [r module list] 0] 1] infotest
r config rewrite
restart_server 0 true false
assert_equal [lindex [lindex [r module list] 0] 1] infotest
r module unload infotest
r config rewrite
restart_server 0 true false
assert_equal [llength [r module list]] 0
}
}