miniredis
miniredis copied to clipboard
not support mock err
when i write unit test, i need to write case with redis command return err. So how can i use miniredis return err with specify parameters
Maybe this method helps?
// make every command return this message. For example:
//
// LOADING Redis is loading the dataset in memory
// MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'.
//
// Clear it with an empty string. Don't add newlines.
func (m *Miniredis) SetError(msg string)