Skip to content

Commit

Permalink
Add DESIGN_PRINCIPLES.md draft
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Oct 28, 2022
1 parent d7534a5 commit e700d7a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions DESIGN_PRINCIPLES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Design principles

This documents aims to capture the design principles that went into this library.
It should serve as a reference point when making decisions on what features to include or exclude.

## Simple

One of most important goals that we want to adhere to is creating a _simple_ API.
Overall, this means keeping the API as small as possible to get the task done.
When in doubt, we'd rather not add flags or configuration options for certain use cases.

Tests should be easier to write, easy to understand and easy to maintain.
`testcontainers` aims to support this as much as possible.
Having too many configuration options makes it harder for users to achieve this goal.

Another advantage of a small, public API is that we have to make fewer breaking changes.
This makes upgrades easier for our users.

## Reliable

Tests need to be reliable to provide value.
We strive to make `testcontainers` as reliable as possible and try to control as many aspects of the container to make sure they work consistently.

One consequence of this decision is that the container _tag_ is typically not configurable for images that ship with `testcontainers`.
Whilst an image behind a tag can also change, image authors tend to preserve compatibility there.
If we were to allow users to change the `tag` of an image, we wouldn't be able to guarantee that it works because we cannot test all combinations.

0 comments on commit e700d7a

Please sign in to comment.