EmbarkStudios / discord-sdk

An open implementation of the Discord Game SDK in Rust
Apache License 2.0
150 stars 10 forks source link

Add mock server #3

Open Jake-Shadle opened 3 years ago

Jake-Shadle commented 3 years ago

Since Discord themselves don't provide any kind of headless test server for RPCs, there's no good way to do automated testing in a normal headless environment since it requires installing the full Discord app, and logging into it, which, AFAICT, is impossible in a headless environment as Discord doesn't support command line arguments.

While testing locally in a regular desktop environment works, this is tedious and easy to miss stuff, especially from outside contributors, so I think it makes sense to make a unix domain socket/named pipe server that tests can fill out with preplanned responses/events to add a bit more sanity checking to CI.