summaryrefslogtreecommitdiffstats
path: root/tests/unit/moduleapi/infra.tcl
blob: 7bfa7d4b371d5346e0506f3dc16e4bf5da7985d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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

        assert_equal {OK} [r module unload infotest]

        r config rewrite
        restart_server 0 true false

        assert_equal [llength [r module list]] 0
    }
}