| Crates.io | redis-module-test-rs |
| lib.rs | redis-module-test-rs |
| version | 0.1.0 |
| created_at | 2024-05-26 20:15:44.455845+00 |
| updated_at | 2024-05-26 20:15:44.455845+00 |
| description | A toolkit for testing Redis modules in Rust |
| homepage | https://github.com/ashtul/redis-module-test-rs |
| repository | https://github.com/ashtul/redis-module-test-rs |
| max_upload_size | |
| id | 1252798 |
| size | 6,907 |
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");