mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
1.7 KiB
1.7 KiB
- Dev-only crate that starts real Redis for tests. Never a dependency outside
[dev-dependencies] - Same shape as
db-testing: one container per test, a handle that removes it on drop - The host port is fixed at start so
restartkeeps the same URL and a client can reconnect to it RedisClusterruns 3 masters in one container. Each node listens on the same port inside and outside and announces 127.0.0.1, so MOVED redirects work from the test process- Outages come from the container (
restart,freeze/thaw), neverDEBUG, which the official image disables - No env gate that makes a test pass without Redis. A test that can't start its container fails
RedisTlsServerserves TLS with certificatesrcgengenerates per start, forlocalhost, optionally requiring a client certificateRedisSentinelruns a primary, a replica and one sentinel in one container, all announcing 127.0.0.1.failover()returns once the replica is master and the old master is a replicacli/cli_on_every_noderunredis-cli -einside the container for setup such as ACL users, so tests don't need a second client.-emakes an error reply fail the call, and a test whose setup changes server state also asserts that state before relying on it- Not
redis-test's server helpers, which need localredis-serverandopensslbinaries RedisDeploymentruns eitherTopology, so a test can take#[values(Topology::Standalone, Topology::Cluster)].clients()returns every client connection on every node fromCLIENT LIST, leaving out the CLI's own- Server fixtures only. This crate never depends on a Redis client crate, so the client crates can dev-depend on it without a cycle