Closed zedar closed 3 years ago
support for txpipeline has been added:
mock.ExpectTxPipeline()
mock.ExpectGet("key").SetVal("value")
mock.ExpectSet("key", "value", 1).SetVal("OK")
mock.ExpectTxPipelineExec()
pipe = db.TxPipeline()
pipe.Get(ctx, "key")
pipe.Set(ctx, "key", "value", 1)
pipe.Exec(ctx)
What is the best way of mocking
client.TxPipeline
? When expectations are define for the following:HSet
,ZAddNX
the following error is returned: call to cmd '[multi]' was not expected