Skip to content

Commit

Permalink
Contributing guide for running local integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
r0mdau committed Dec 30, 2024
1 parent 6212bde commit a510187
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions extension/cgroupruntimeextension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to the Cgroup Go runtime extension

In order to contribute to this extension, it might be useful to have a working local setup.

## Testing

To run the integration tests locally for this extension, you can follow theses steps in a Linux environment.

Inside the extension folder, start a privileged docker container and share the code with the container

```bash
cd extension/cgroupruntimeextension
docker run -ti --privileged --cgroupns=host -v $(pwd):/workspace -w /workspace debian:bookworm-slim
```

Install Go and gcc to run the integration test

```bash
apt update && apt install -y wget sudo gcc && wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz && export PATH=$PATH:/usr/local/go/bin && go version && rm go1.23.4.linux-amd64.tar.gz
```

Run the integration test

```bash
CGO_ENABLED=1 go test -v -exec sudo -race -timeout 360s -parallel 4 -tags=integration,""
```
4 changes: 4 additions & 0 deletions extension/cgroupruntimeextension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ extension:
enabled: true
ratio: 0.8
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute to this extension.

0 comments on commit a510187

Please sign in to comment.