Skip to content

Commit eaa0172

Browse files
committed
Expose Server() so custom commands can be implemented for testing
1 parent 0f5f599 commit eaa0172

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

miniredis.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ func (m *Miniredis) FastForward(duration time.Duration) {
273273
}
274274
}
275275

276+
// Server returns the underlying server to allow custom commands to be implemented
277+
func (m *Miniredis) Server() *server.Server {
278+
return m.srv
279+
}
280+
276281
// redigo returns a redigo.Conn, connected using net.Pipe
277282
func (m *Miniredis) redigo() redigo.Conn {
278283
c1, c2 := net.Pipe()

0 commit comments

Comments
 (0)