redis-module-test-rs

Crates.ioredis-module-test-rs
lib.rsredis-module-test-rs
version0.1.0
sourcesrc
created_at2024-05-26 20:15:44.455845
updated_at2024-05-26 20:15:44.455845
descriptionA toolkit for testing Redis modules in Rust
homepagehttps://github.com/ashtul/redis-module-test-rs
repositoryhttps://github.com/ashtul/redis-module-test-rs
max_upload_size
id1252798
size6,907
Ariel Shtul (ashtul)

documentation

README

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");
Commit count: 1

cargo fmt