mc0/redeque — pull request #11 by mediocregopher (2014-12-24 21:02:19+00:00)
Title: Tests (and other fixes)

Major changes in this PR, besides the addition of tests:

* Refactored the consumers code. One of the tests showed it not actually working properly (not cleaning up consumer set for queues that didn't have any active consumers), and I wanted to refactor it to be a bit more readable and testable anyway. So I did that.

* Made `QSTATUS` take in an optional list of queue names. This was mostly to aid in testing, but it could be useful to users too. Also, made the output be more human readable.

* Made `clients.Client` hold onto a `ClientConn` instead of a `net.Conn`. A `ClientConn` is an interface I made up which encompasses all the features we need out of a `net.Conn`, while still allowing us to essentially fake a network connection in our tests.