mirror of
https://github.com/redis/redis.git
synced 2026-02-03 20:39:54 -05:00
integrate module API tests into default test suite - Add module_tests target to main Makefile to build test modules - Include unit/moduleapi in test_dirs to run module tests with ./runtest - Module API tests now run by default instead of requiring runtest-moduleapi --------- Co-authored-by: debing.sun <debing.sun@redis.com>
28 lines
711 B
Tcl
28 lines
711 B
Tcl
set testmodule [file normalize tests/modules/eventloop.so]
|
|
|
|
start_server {tags {"modules external:skip"}} {
|
|
r module load $testmodule
|
|
|
|
test "Module eventloop sendbytes" {
|
|
assert_match "OK" [r test.sendbytes 5000000]
|
|
assert_match "OK" [r test.sendbytes 2000000]
|
|
}
|
|
|
|
test "Module eventloop iteration" {
|
|
set iteration [r test.iteration]
|
|
set next_iteration [r test.iteration]
|
|
assert {$next_iteration > $iteration}
|
|
}
|
|
|
|
test "Module eventloop sanity" {
|
|
r test.sanity
|
|
}
|
|
|
|
test "Module eventloop oneshot" {
|
|
r test.oneshot
|
|
}
|
|
|
|
test "Unload the module - eventloop" {
|
|
assert_equal {OK} [r module unload eventloop]
|
|
}
|
|
}
|