-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add decision record about using Testcontainers (#3255)
- Loading branch information
1 parent
327cbd7
commit 999bad8
Showing
3 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
docs/developer/decision-records/2023-06-30-allow-use-of-testcontainers/README.md
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,23 @@ | ||
# Allow and regulate the usage of Testcontainers | ||
|
||
## Decision | ||
|
||
Using Testcontainers is henceforth allowed, and it is the preferred way to integration-test with third-party software | ||
components. | ||
|
||
## Rationale | ||
|
||
Testcontainers are a self-contained way to run tests against real third-party software products, such as Postgres. Up | ||
until now the EDC guideline was to separate test code from infrastructure, but this rule is now relaxed in that | ||
integration tests may now use Testcontainers. | ||
|
||
However, this does _not_ mean that we should use component tests or integration tests for everything. Or: unit tests are | ||
still the preferred way to test software components, they should continue to make up the largest part of our test code | ||
base. | ||
|
||
## Approach | ||
|
||
- Every test that uses a Testcontainer must be annotated either with `@ComponentTest` or another suitable integration | ||
test annotation. So when tests are run locally on developers' machines by default only unit tests are executed. | ||
- New integration/component tests should use Testcontainers | ||
- Existing component/integration tests are gradually converted over to using Testcontainers |
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
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