CONTRIBUTING.md in bunny-2.8.1 vs CONTRIBUTING.md in bunny-2.9.0
- old
+ new
@@ -37,11 +37,12 @@
This can be done either by using a locally installed RabbitMQ server or by
running a RabbitMQ server in a Docker container.
#### Using a locally installed RabbitMQ server
-Run the following command from the base directory of the gem:
+It is possible to start a local RabbitMQ node from the repository root. It is not necessarily
+optimal but can be a good starting point but is a useful example:
```
RABBITMQ_NODENAME=bunny RABBITMQ_CONFIG_FILE=./spec/config/rabbitmq RABBITMQ_ENABLED_PLUGINS_FILE=./spec/config/enabled_plugins rabbitmq-server
```
@@ -49,15 +50,22 @@
be available. The config files in the spec/config directory enable
these. TLS (x509 PEM) certificates include a hostname-specific fields,
the tests allow for expecting hostname overriding using the `BUNNY_RABBITMQ_HOSTNAME`
environment variables (default value is `127.0.0.1`).
-Server, CA and client certificates can be found under `spec/tls`.
-The location can be overridden via the `BUNNY_CERTIFICATE_DIR` environment variable.
+By default there's a set of CA, server, and client certificates pre-generated at `spec/tls`. Since x509 certificates
+contain a hardcoded CN and your hostname is unlikely to match it,
+the location can be overridden via the `BUNNY_CERTIFICATE_DIR` environment variable.
It is supposed to target [tls-gen](https://github.com/michaelklishin/tls-gen)'s basic profile
-output (result) directory on the host where specs are to be executed.
+output (result) directory on the host where specs are to be executed. Combine it with `BUNNY_RABBITMQ_HOSTNAME`
+when running TLS connection tests:
+```
+BUNNY_CERTIFICATE_DIR="/path/to/tls-gen/basic/result" BUNNY_RABBITMQ_HOSTNAME="mayflower" bundle exec rspec
+
+```
+
Next up you'll need to prepare your node for the specs (just once):
```
RABBITMQ_NODENAME=bunny ./bin/ci/before_build
```
@@ -102,10 +110,10 @@
bundle install
rake integration
It is possible to run all tests:
- bundle exec rspec -c
+ bundle exec rspec
It is possible to run only integration and regression tests but exclude unit and stress tests:
- CI=true bundle exec rspec -c spec/higher_level_api/ spec/lower_level_api spec/issues && bundle exec rspec -c spec/higher_level_api/integration/connection_recovery_spec.rb
+ CI=true bundle exec rspec spec/higher_level_api/ spec/lower_level_api spec/issues spec/higher_level_api/integration/connection_recovery_spec.rb