{"repo":"alicebob/miniredis","free":true,"listed":false,"github":"https://github.com/alicebob/miniredis","clone":"git clone https://github.com/alicebob/miniredis.git","description":"Pure Go Redis server for Go unittests","language":"Go","stars":3599,"topics":["redis","go","unittest"],"license":"MIT","category":"databases-storage","readme_excerpt":"Miniredis Pure Go Redis test server, used in Go unittests. Sometimes you want to test code which uses Redis, without making it a full-blown integration test. Miniredis implements (parts of) the Redis server, to be used in unittests. It enables a simple, cheap, in-memory, Redis replacement, with a real TCP interface. Think of it as the Redis version of net/http/httptest . It saves you from using mock code, and since the redis server lives in the test process you can query for values directly, without going through the server stack. There are no dependencies on external binaries, so you can easily integrate it in automated build processes. Be sure to import v2: Commands Implemented commands: - Connection - AUTH -- see RequireAuth() - ECHO - HELLO -- see RequireUserAuth() - PING - SELECT - SWAPDB - QUIT - Key - COPY - DEL - DUMP -- partly, only handles string keys - EXISTS - EXPIRE - EXPIREAT - EXPIRETIME - KEYS - MOVE - PERSIST - PEXPIRE - PEXPIREAT - PEXPIRETIME - PTTL - RANDOMKEY -- see m.Seed(...) - RENAME - RENAMENX - RESTORE -- partly, only handles string keys - SCAN - TOUCH - TTL - TYPE - UNLINK - WAIT -- no-op - Transactions - DISCARD - EXEC - MULTI - UNWATCH - WATCH - Server - DBSIZE - FLUSHALL - FLUSHDB - TIME -- returns time.Now() or value set by SetTime() - COMMAND -- partly - INFO -- partly, returns only \"clients\" section with one field \"connected clients\" - String keys - APPEND - BITCOUNT - BITOP - BITPOS - DECR - DECRBY - DELEX -- partly - GET - GETBIT - GETDEL - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/alicebob","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alicebob/miniredis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}