Search code examples
dockerdocker-composeazure-functionssignalre2e-testing

connect azure functions to local signalr instance


I am currently writing tests for an existing project based on azure functions. The project uses signalr to send live update messages to the clients.

For my tests I am currently using a signalr instance, that is running in the cloud, but I need to replace it by a "local" instance on the system, that is running the tests, so i can be 100% sure, that the signalr message is coming from my test session.

Does anybody have an idea, how to get a signalr-server running in a docker container for my tests (i need a connection string i can provide for the azure functions app)?

I could not find anything online. I am sure I am not the only one, who wants to test if signalr messages are send correctly and i would prefer not to implement the signalr-server myself.


Solution

  • I didn't find any way how to achieve this, so i created a repo with a small mock service for the SignalR service. I hope I am allowed to post such stuff here.

    My repo and my docker image

    Feel free to use / fork it. I am not sure if I will ever find any time to maintain it.