From 2cbe75860999719f2741bdcc4c50509112344af6 Mon Sep 17 00:00:00 2001 From: Christiaan Baartse Date: Fri, 16 Oct 2015 20:19:03 +0200 Subject: [PATCH] Run tests with docker Added documentation on how to use docker to run the testsuite --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59b58742..05c850b1 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,15 @@ open.then(function(conn) { npm test -Best run with a locally-installed RabbitMQ, but you can point it at -another using the environment variable `URL`; e.g., +To run the tests RabbitMQ is required. Either install it with your package +manager or use [docker][] to run a RabbitMQ instance. + + docker run -d --name amqp.test -p 5672:5672 rabbitmq + +If prefer not to run RabbitMQ locally it is also possible to use a instance +of RabbitMQ hosted elsewhere. Use the `URL` environment variable to configure a +different amqp host to connect to. One such host is dev.rabbitmq.com which you +can also use to run the tests like so. URL=amqp://dev.rabbitmq.com npm test @@ -146,3 +153,4 @@ really only useful for checking the kind and formatting of the errors. [tutes]: https://github.com/squaremo/amqp.node/tree/master/examples/tutorials [rabbitmq-tutes]: http://www.rabbitmq.com/getstarted.html [changelog]: https://github.com/squaremo/amqp.node/blob/master/CHANGELOG.md +[docker]: https://www.docker.com/