redis/tests/unit/moduleapi/eventloop.tcl
Stav-Levi 81df8deca6
Run module tests as part of the base redis testsuit (#14226)
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>
2025-08-26 14:49:05 +03:00

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]
}
}