Open cpick opened 6 years ago
hi @cpick
I think this crate could include websocket support as long as it doesn't complicate things. the http_muncher
crate that I use to parse http has some websocket support afaik (it's based on the node http parser).
PRs are welcome :cake:
I need this as well, but before I get into it implementing it - how open is the project to a dependency on http and maybe websocket? I ask because that would change the center of gravity on this project from: a 'nothing up your sleeves' barebone http server plus test harness, to: just a test harness. That would be bad for a learning project, but good for a production crate. Is that ok with you @lipanski? I'd be happy to give it a go, so long as I can avoid dragging in futures.
@sterlingjensen is there any way to allow mocking websockets without pulling in big dependencies? I'd prefer that, even if writing websocket tests would be a bit more verbose than without the extra dependencies. websockets are not such a common test scenario so I'd rather not have everyone depend on additional crates because of that (or at least not on big crates).
@lipanski not without writing a websocket server and client. I've been working on a greenfield implementation, because you're right - it wouldn't make sense to pull in a dependency that reimplements so much existing functionality.
I would also need support for websockets :/ Websockets are becoming more and more common..
@lipanski I think it's fine as long as the websocket support is put under a feature flag ? So that you don't pull in all dependencies if you want to mock just http requests.
Any libraries that can be used while this get implemented in mockito?
I've been using Mockito to test my RESTy client code and I've recently started using some WebSocket endpoints as well.
Is there any interest in/has there been any thought about adding WebSocket mocking to Mockito?
If there is interest, I may be able to spend some time on it.