Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestRedisClient ¶
func NewTestRedisClient() (*redis.Client, *rediskittestutil.MockRedis)
NewTestRedisClient creates an in-memory Redis client for testing.
It uses miniredis, which implements real Redis semantics (including Lua EVAL, SET NX, and WATCH/MULTI) so tests exercise the same atomic code paths as production. The redis-kit MockRedis only understood a few hardcoded Lua scripts and could not validate the distributed-lock / swap-active / atomic idempotency invariants introduced in the security hardening work.
The second return value is retained for source compatibility with existing callers that expect a *MockRedis; it is nil because miniredis is used instead. Callers only ever used the *redis.Client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.