Skip to content

Contributing#

Slack: testcontainers-native on slack.testcontainers.com Stability: Experimental

Contributions are welcome! For any feedback and suggestions, use GitHub Issues.

Community Slack#

We use the #testcontainers-native channel on Testcontainers Slack. Please join this channel if you want to discuss contributions/strategy/whatever. GitHub Issues are recommended for most of the proposals and bug reports though.

Code patches#

To propose a code patch, just submit a pull request to the repository. No need to create a GitHub issue if you want to suggest a simple patch, pull requests are more than enough for it.

Building the project#

You need CMake 3.16.3 and Golang 1.19+. At the moment there are not so many configuration flags, so the build is straightforward:

cmake .
cmake --build .
ctest --output-on-failure

To skip the demo builds and tests, use the SKIP_DEMOS variable:

cmake -DSKIP_DEMOS=true .

Contributing to the Documentation#

The documentation is structured in the MkDocs format and uses Material for MkDocs. To develop the site in this repository, start it in the Dev Containers and use the following commands:

mkdocs serve
mkdocs build

Codestyle#

Public APIs#

  • snake_case is used to name methods
  • tc_ is used as a prefix for all exported Testcontainers functions
  • When possible, we try to avoid special Golang types in public API and try to expose wrapper types
  • const is important for users, and please add it to your arguments when possible. There is no Const in Golang, so some typedef injection is needed when importing CGo