Skip to content

Commit d941cae

Browse files
committed
contributing: add Development section
Add a section to the Contributing page with a link to the main 'Building Pomerium From Source' instructions as well as instructions for running tests locally.
1 parent 0038f26 commit d941cae

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

content/docs/community/contributing.md

+35
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,41 @@ Here are some of the expectations we have of contributors:
4242
- [Best Practices for Maintainers](https://opensource.guide/best-practices/)
4343
- [Shrinking Code Review](https://alexgaynor.net/2015/dec/29/shrinking-code-review/)
4444

45+
### Development
46+
47+
See [Building Pomerium From Source](/docs/deploy/core/from-source) for information on getting started developing for Pomerium.
48+
49+
To run the unit tests locally:
50+
51+
```bash
52+
make test
53+
```
54+
55+
The instrumentation tests run using Docker Compose. To run the instrumentation tests locally, first build a development Docker image:
56+
57+
```bash
58+
./scripts/build-dev-docker.bash
59+
```
60+
61+
Next pick a configuration from the `integration/clusters` directory, for example `single-stateful`, and use Docker Compose to start that configuration. Use the `POMERIUM_TAG` environment variable to specify the `dev` docker image built in the previous step:
62+
63+
```bash
64+
cd integration/clusters/single-stateful
65+
env POMERIUM_TAG=dev docker compose up -V
66+
```
67+
68+
Once that's up and running you can run the integration tests from another terminal:
69+
70+
```bash
71+
go test -count=1 -v ./integration/...
72+
```
73+
74+
If you need to make a change to the test configuration itself, there's a [tpl](https://github.com/pomerium/pomerium/tree/main/integration/tpl) folder that contains `jsonnet` files. Make a change and then rebuild the configuration by running:
75+
76+
```bash
77+
go run ./integration/cmd/pomerium-integration-tests/ generate-configuration
78+
```
79+
4580
### Logging
4681

4782
Pomerium uses the [zerolog](https://github.com/rs/zerolog) package for logging. Guidelines for log levels:

0 commit comments

Comments
 (0)