The test suite requires a RabbitMQ node listening on localhost:5672 (and the default TLS port for TLS tests). The tests use the rabbitmqctl tool to manage the node. You can specify the location of this tool using the RABBITMQ_RABBITMQCTL_PATH environment variable.
Windows (Binary Release)
If using a RabbitMQ binary release on Windows, set the path to the .bat file:
$env:RABBITMQ_RABBITMQCTL_PATH='C:\Program Files\RabbitMQ Server\rabbitmq_server-X.Y.Z\sbin\rabbitmqctl.bat'
MacOS and Linux (Binary Release)
Add the RabbitMQ CLI tools to your PATH so rabbitmqctl can be invoked directly.
MacOS and Linux (Source Build)
If running a node built from source, set the path to the rabbitmqctl script:
RABBITMQ_RABBITMQCTL_PATH=/path/to/rabbitmqctl dotnet test projects/Test/Unit/Unit.csproj
Using Docker
To run tests against a RabbitMQ node in a Docker container, set RABBITMQ_RABBITMQCTL_PATH to DOCKER:<container_name_or_id>. The tests will then execute commands via docker exec <container> rabbitmqctl <args>.
Example container setup:
docker run -d --hostname rabbitmq-dotnet-client-rabbitmq --name rabbitmq-dotnet-client-rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:management