Open guileen opened 11 years ago
The issue came from there but I currently don't have the time to look into it. Please note that I'll happily accept pull requests :)
@FGRibreau It's a little complex to mock all redis functions from scratch, like zset is much difficult. I have found a new way to do the redis_mock, I use the redis lua client, and wrap it to mock redis.call,
My pleasure if you can take a look: https://github.com/guileen/redis-extras/blob/master/redis-mock.lua#L28-L40
Nice catch!
But it means you will need a running Redis server, so it may not always be the simplest solution. I'll keep the ticket open for further updates.
redis.call('hget', 'foo', 'bar')
lua: ./redis-lua-unit/src/commands/hash.lua:22: assertion failed! stack traceback: C: in function 'assert' ./redis-lua-unit/src/commands/hash.lua:22: in function '?' ./redis-lua-unit/src//RedisLua.lua:20: in function 'call' test.lua:10: in main chunk