-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
producer/consumer: ability to mock for tests #182
Comments
Basically I'd like to have some of these methods made public - https://github.com/nsqio/go-nsq/blob/master/mock_test.go |
@jchauncey I'm not sure how i feel about exposing an interface in go-nsq for testing, but I've used this to much success https://gist.github.com/jehiah/572be9b20c55e5ebbd2d21c73da5b08e It might be sufficient for your needs too. The included |
So what i wanted to do was test the consumption of a mock message in an app I was writing without having to actually start nsq. I ended up copying a lot of the functions in |
The code in I feel like what you want could be much simpler, and depending on what we came up with I think we could at least consider providing as a set of exported types in Are you interested in taking a pass? |
See #146 |
Is it still not possible to mock NSQ? |
Would be awesome if there was some way to create a mock producer/consumer that acted like it was actually interacting with a real nsq instance.
The text was updated successfully, but these errors were encountered: