#redis #testing

redis-module-test-rs

A toolkit for testing Redis modules in Rust

1 unstable release

0.1.0 May 26, 2024

#1842 in Database interfaces

BSD-3-Clause

6KB
110 lines

This crate is an excerpt from the redismodule-rs crate which allows for easy testing.

Basic usage:

let mut con: TestConnection = TestConnection::new("module");
let res: String = redis::cmd("module.cmd")
    .arg(&["arg1", "arg2"])
    .query(&mut con)
    .with_context(|| "failed to run module.cmd")?;
assert_eq!(res, "OK");

Dependencies

~10–19MB
~310K SLoC