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: docs/testing.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,3 +63,31 @@ Containers built by a PR and stored on GitHub Container Registry can be tested l
63
63
* [Monitoring API](http://localhost:33633)
64
64
* [ServicePulse (latest from Docker Hub)](http://localhost:9090)
65
65
6. Tear down services using `docker compose down`.
66
+
67
+
68
+
## Container tests using Aspire
69
+
70
+
The https://github.com/Particular/Particular.Aspire.Hosting.ServicePlatform package integrates servicecontrol with the Aspire hosting platform. This package configures environment variables to attach the platform. There is a single file apphost in [`testghcr-tag-aspire`](/docs/testghcr-tag-aspire) to start up serviceconrol from a prerelease container image.
71
+
72
+
Containers built by a PR and stored on GitHub Container Registry can be tested locally:
73
+
74
+
1. Make sure you have the [Aspire CLI installed](https://aspire.dev/get-started/install-cli/).
75
+
2. [Authenticate to the GitHub Container Registry using a personal access token](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic).
76
+
- Create a [classic token](https://github.com/settings/tokens). Select the scope for`read:packages`
77
+
- Copy the newly created token text.
78
+
- Run the following commandin a terminal:
79
+
```shell
80
+
docker login ghcr.io
81
+
```
82
+
you will be prompted for a username (your particular.net email) and a password (the token)
83
+
- ensure that you get a successful login message.
84
+
- Use `docker logout ghcr.io` once the following steps are complete and consider removing the token from github if its no longer needed.
85
+
4. Run `aspire run docs/test-ghcr-tag-aspire/AppHost.cs -- [tag]` to start the application, where [tag] is the PR-based tag (in the form `pr-####`) to test. If no tag is provided, it will default to the `latest` tag.
86
+
5. Once running you can open the dashboard from the link in the terminal, this dashboard will provide the assigned ports for each service.
87
+
* RabbitMQ Management (Login: `guest`/`guest`)
88
+
* RavenDB
89
+
* ServiceControl API
90
+
* Audit API
91
+
* Monitoring API
92
+
* ServicePulse (latest from Docker Hub)
93
+
6. Aspire will automatically tear down the application when you exit the CLI process.
0 commit comments