diff --git a/runtest-moduleapi b/runtest-moduleapi index 7c17501e0..11d496a27 100755 --- a/runtest-moduleapi +++ b/runtest-moduleapi @@ -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 \ diff --git a/tests/unit/moduleapi/infra.tcl b/tests/unit/moduleapi/infra.tcl new file mode 100644 index 000000000..077487457 --- /dev/null +++ b/tests/unit/moduleapi/infra.tcl @@ -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 + } +}