You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RUNNING_TESTS.md
+47-27Lines changed: 47 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,15 @@ and perform protocol encoder/decoder code generation.
17
17
18
18
On Windows run:
19
19
20
-
build.bat
20
+
```powershell
21
+
build.bat
22
+
```
21
23
22
-
On osx/linux run:
24
+
On MacOS and linux run:
23
25
24
-
build.sh
26
+
```shell
27
+
build.sh
28
+
```
25
29
26
30
This will complete the code AMQP 0-9-1 protocol code generation and build all projects. After this open the solution in Visual Studio.
27
31
@@ -34,40 +38,56 @@ may take some time for the adapter to discover tests in the assemblies.
34
38
The test suite assumes there's a RabbitMQ node running locally with all
35
39
defaults, and the tests will need to be able to run commands against the
36
40
[`rabbitmqctl`](https://www.rabbitmq.com/rabbitmqctl.8.html) tool for that node.
37
-
Two options to accomplish this are:
41
+
Two options to accomplish this are covered below.
42
+
43
+
### Using RabbitMQ Umbrella Repository
38
44
39
45
1. Team RabbitMQ uses [rabbitmq-public-umbrella](https://github.com/rabbitmq/rabbitmq-public-umbrella), which sets up a local RabbitMQ server [built from source](https://www.rabbitmq.com/build-server.html):
2. You can load a RabbitMQ node in a [docker](https://www.docker.com/) container. You will need to create an environment variable `RABBITMQ_RABBITMQCTL_PATH` and set it to `DOCKER:<container_name>` (for example `DOCKER:rabbitmq01`). This tells the unit tests to run the `rabbitmqctl` commands through docker, in the format `docker exec rabbitmq01 rabbitmqctl <args>`:
`rabbitmqctl` location will be computed using a relative path in the umbrella.
57
+
It is possible to override the location using `RABBITMQ_RABBITMQCTL_PATH`:
55
58
56
-
```
57
-
run-test.bat
58
-
```
59
+
```
60
+
RABBITMQ_RABBITMQCTL_PATH=/path/to/rabbitmqctl dotnet test projects/Unit
61
+
```
59
62
60
-
On MacOS, Linux, BSD use:
63
+
### Using a Docker Container
61
64
62
-
```
63
-
run-test.sh
64
-
```
65
+
It is also possible to run a RabbitMQ node in a [Docker](https://www.docker.com/) container. Set the environment variable `RABBITMQ_RABBITMQCTL_PATH` to `DOCKER:<container_name>` (for example `DOCKER:rabbitmq01`). This tells the unit tests to run the `rabbitmqctl` commands through Docker, in the format `docker exec rabbitmq01 rabbitmqctl <args>`:
65
66
66
-
Running individual tests and fixtures on Windows is trivial using the Visual Studio test runner.
67
-
To run a specific tests fixture on MacOS or Linux, use the NUnit filter expressions to select the tests
0 commit comments