Skip to content

Commit 2cbe758

Browse files
committed
Run tests with docker
Added documentation on how to use docker to run the testsuite
1 parent 5bc849e commit 2cbe758

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,15 @@ open.then(function(conn) {
111111

112112
npm test
113113

114-
Best run with a locally-installed RabbitMQ, but you can point it at
115-
another using the environment variable `URL`; e.g.,
114+
To run the tests RabbitMQ is required. Either install it with your package
115+
manager or use [docker][] to run a RabbitMQ instance.
116+
117+
docker run -d --name amqp.test -p 5672:5672 rabbitmq
118+
119+
If prefer not to run RabbitMQ locally it is also possible to use a instance
120+
of RabbitMQ hosted elsewhere. Use the `URL` environment variable to configure a
121+
different amqp host to connect to. One such host is dev.rabbitmq.com which you
122+
can also use to run the tests like so.
116123

117124
URL=amqp://dev.rabbitmq.com npm test
118125

@@ -146,3 +153,4 @@ really only useful for checking the kind and formatting of the errors.
146153
[tutes]: https://github.com/squaremo/amqp.node/tree/master/examples/tutorials
147154
[rabbitmq-tutes]: http://www.rabbitmq.com/getstarted.html
148155
[changelog]: https://github.com/squaremo/amqp.node/blob/master/CHANGELOG.md
156+
[docker]: https://www.docker.com/

0 commit comments

Comments
 (0)