Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

fakeredis

Build Status

Presentation

fakeredis is a Redis mock for Lua with the same interface as redis-lua.

Dependencies

Lua 5.1 users will need Lua BitOp.

If you do not set a custom sleep function and LuaSocket is not installed, a busy wait will be used for sleep().

Tests require cwtest.

Usage

local R = fakeredis.new()
R:set("foo", "bar")
local foo = R:get("bar")

See redis-lua for more.

Design

fakeredis tries to keep its interface compatible with redis-lua but is not fully complete, see supported.txt for supported commands.

fakeredis does not support multiple DBs. You should probably not use them anyway. If you really need SELECT in tests it is easy to write a small wrapper that uses multiple instances of fakeredis.

Copyright

Copyright (c) 2012-2016 Pierre Chapuis

About

A Redis mock for Lua with the same interface as redis-lua.

Topics

Resources

License

Packages

No packages published