You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+85-33Lines changed: 85 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,77 +7,129 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.13.0] - 2022-04-04
11
+
12
+
### Added
13
+
14
+
- A new client implementation that talks to the Docker daemon via **HTTP**.
15
+
This implementation is available as `testcontainers::clients::Http` and provides an **async** interface.
16
+
As of now, this implementation is guarded behind the `experimental` feature-flag and not yet guaranteed to work flawlessly.
17
+
- Allow using `podman` CLI in addition to `docker`
18
+
- The `TESTCONTAINERS` environment variable to control what happens to containers and networks at the end of a test.
19
+
The default value is `remove` which deletes all containers and networks that were used in the test.
20
+
By setting the value to `keep`, containers and networks will not be deleted but kept **running**.
21
+
You will have to **stop** and **delete** those yourself eventually.
22
+
- Upgrade default bitcoin-core image version to 0.21.0. This allows us to remove `-debug` for bitcoind and replace it with
23
+
`-startupnotify=echo ...`. More details on bitcoind 0.21.0 can be found [here](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md).
24
+
Note: This release also removed the default wallet.
25
+
-`expose_port` functionality to `Image` trait.
26
+
-`Google Cloud SDK` image
27
+
-`RabbitMQ` image
28
+
-`WaitFor::Healthcheck` container ready condition, which corresponds with the [healthcheck](https://docs.docker.com/engine/reference/builder/#healthcheck) status.
29
+
-`MinIO` image
30
+
31
+
### Changed
32
+
33
+
- How images express when a container is ready: Instead of implementing `wait_until_ready`, images now need to implement `ready_conditions` which returns a list of `WaitFor` instances.
34
+
- Return value of `get_host_port` from `Option<u16>` to `u16`.
35
+
If the port cannot be resolved, this function will now **panic**.
36
+
- MSRV bumped to 1.46.
37
+
- Make `Docker` trait `pub(crate)`.
38
+
This reduces the API surface of the crate which allows for fewer breaking changes in the future.
39
+
All functionality from `Docker` (start, stop, rm, and ports) is available on a container directly.
40
+
-`descriptor` is broken down into `name` and `tag` within `Image` trait.
41
+
- Bump `MongoDB`-image default version to `5.0.6`.
42
+
43
+
### Removed
44
+
45
+
-`DYNAMODB_ADDITIONAL_SLEEP_PERIOD` variable from `dynamodb_local` image.
46
+
Previously, we had a fallback of 2 seconds if this variable was not defined.
47
+
We now wait for 2 seconds unconditionally after the specified message has been found.
48
+
- Support for the `KEEP_CONTAINERS` env variable.
49
+
The functionality of `KEEP_CONTAINERS=true` is superseded by `TESTCONTAINERS=keep`.
50
+
-`with_entrypoint` from the `Image` trait.
51
+
This functionality is not used within the library.
52
+
Images that need this kind of customization can always implement it on their own type directly but there is no need to force it onto them.
53
+
-`Image::EnvVars` and `Image::Volumes` associated types.
54
+
The respective functions `Image::env_vars` and `Image::volumes` still exist but now return a trait object that must implement `Iterator<Item = (&String, &String)`.
55
+
This allows us to provide a default implementation which reduces the boilerplate in defining new images.
56
+
-`args` and `with_args` from `Image` trait.
57
+
58
+
### Fixed
59
+
60
+
- Removing a docker container did not error if failed. This was fixed by asserting the daemon's response instead of
61
+
just the status code: If a docker container was removed correctly using `rm -f -v <ID>` <ID> is printed on stdout.
62
+
<ID> can either be the container name or its ID which is used within testcontainer-rs.
63
+
- Fixed clippy warnings of camel case names containing a capitalized acronym.
64
+
10
65
## [0.12.0] - 2021-01-27
11
66
12
67
### Added
13
68
14
-
-Allow custom version for postgres image
15
-
-Remove `derivative` dependency
16
-
-`OrientDB` image
17
-
-`Zookeeper` image
69
+
- Allow custom version for postgres image
70
+
- Remove `derivative` dependency
71
+
-`OrientDB` image
72
+
-`Zookeeper` image
18
73
19
74
### Changed
20
75
21
-
-Move port mapping logic to `RunArgs` instead of each Image.
76
+
- Move port mapping logic to `RunArgs` instead of each Image.
22
77
23
78
## [0.11.0] - 2020-09-30
24
79
25
80
### Added
26
81
27
-
-`Docker::run_with_args` method. This allows naming a container and assigning it to a specific docker network. The docker
28
-
network will be created if it doesn't exist yet. Once the client is dropped, the network will be removed again if it
29
-
has previously been created. A network that already existed will not be removed.
30
-
-Address-type argument to `coblox/bitcoin-core` Image.
31
-
We are setting `bech32` as a default here.
32
-
This is different from the default of `bitcoind`.
82
+
-`Docker::run_with_args` method. This allows naming a container and assigning it to a specific docker network. The docker
83
+
network will be created if it doesn't exist yet. Once the client is dropped, the network will be removed again if it
84
+
has previously been created. A network that already existed will not be removed.
85
+
- Address-type argument to `coblox/bitcoin-core` Image.
86
+
We are setting `bech32` as a default here.
87
+
This is different from the default of `bitcoind`.
33
88
34
89
### Fixed
35
90
36
-
-Block the thread until containers have been successfully removed.
37
-
Previously, this was done in a fire-and-forget way and hence led to containers not being removed in certain situations.
91
+
- Block the thread until containers have been successfully removed.
92
+
Previously, this was done in a fire-and-forget way and hence led to containers not being removed in certain situations.
38
93
39
94
### Changed
40
95
41
-
-MSRV is now 1.41.0
96
+
- MSRV is now 1.41.0
42
97
43
98
## [0.10.0] - 2020-08-20
44
99
45
100
### Added
46
101
47
-
-Mongo image.
48
-
-Support for the `fallbackfee` argument for the `bitcoin-core` image.
49
-
-Ability to customize the `entrypoint` used by the image.
50
-
-Ability to start a container once stopped.
51
-
102
+
- Mongo image.
103
+
- Support for the `fallbackfee` argument for the `bitcoin-core` image.
104
+
- Ability to customize the `entrypoint` used by the image.
105
+
- Ability to start a container once stopped.
106
+
52
107
### Changed
53
108
54
-
-MSRV bumped to 1.36 from 1.32.
55
-
-Change postgres image authentication POSTGRES_HOST_AUTH_METHOD rather than username and password.
56
-
-Bumped bitcoin-core default tag to 0.20.0.
109
+
- MSRV bumped to 1.36 from 1.32.
110
+
- Change postgres image authentication POSTGRES_HOST_AUTH_METHOD rather than username and password.
111
+
- Bumped bitcoin-core default tag to 0.20.0.
57
112
58
113
## [0.9.1] - 2020-03-24
59
114
60
115
### Added
61
116
62
-
-A changelog
63
-
-Support volumes on containers
117
+
- A changelog
118
+
- Support volumes on containers
64
119
65
120
### Changed
66
121
67
-
-**Breaking**: `Container#get_host_port` now only accepts a `u16` instead of a `u32`.
68
-
`u16` captures all possible port values.
122
+
-**Breaking**: `Container#get_host_port` now only accepts a `u16` instead of a `u32`.
123
+
`u16` captures all possible port values.
69
124
70
125
### Fixes
71
126
72
-
- Provide a default password for the postgres image.
73
-
There seems to be an unfortunate breaking change in the postgres image that we need to cater for.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,25 @@ Please follow this convention while developing new images.
12
12
13
13
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
14
14
15
+
## Formatting
16
+
17
+
While developing, please make sure that your code is formatted using `dprint fmt`.
18
+
You can install `dprint` in various ways: https://dprint.dev/install/
19
+
20
+
## Commits
21
+
22
+
Strive for creating atomic commits.
23
+
That is, commits should capture a single feature, including its tests.
24
+
Ideally, each commits passes all CI checks (builds, tests, formatting, linter, ...).
25
+
26
+
When in doubt, squashing everything into a single but larger commit is preferable over commits that don't compile or are otherwise incomplete.
27
+
28
+
For writing good commit messages, you may find [this](https://chris.beams.io/posts/git-commit/) guide helpful.
29
+
15
30
## Git hooks
16
31
17
-
While developing, please make sure that your code is formatted using `cargo-fmt`.
18
-
You can easily do that by using the pre-defined `git` hooks:
32
+
To ensure every commit is properly formatted, you can opt into pre-defined `git` hooks:
0 commit comments