-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contributing guide for running local integration tests
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,"" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters