Skip to content

Releases: testcontainers/testcontainers-go

v0.16.0

21 Nov 09:00
9ad2a50
Compare
Choose a tag to compare

What's Changed

⚠️ Breaking Changes

  • feat: support native docker compose api (#476) @baez90

    Docker Compose v2 is implemented in Go, and for that reason we have decided to provide native Go support to Compose, deprecating the shell-escape based LocalDockerCompose, which was invoking the local binary of compose. Given the version includes the Compose dependency, and the Docker folks added a replace directive until the upcoming Docker 22.06 release is out, we were forced to add it too, causing consumers of Testcontainers for Go to add the following replace directive too.

replace (
	github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch
	github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch
	github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx

	github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4

	// For k8s dependencies, we use a replace directive, to prevent them being
	// upgraded to the version specified in containerd, which is not relevant to the
	// version needed.
	// See https://github.com/docker/buildx/pull/948 for details.
	// https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64
	k8s.io/api => k8s.io/api v0.22.4
	k8s.io/apimachinery => k8s.io/apimachinery v0.22.4
	k8s.io/client-go => k8s.io/client-go v0.22.4
)
  • fix: do not prepend garbage in the container.Exec response (#624) @mdelapenya

    The signature of the Exec function on a container created by the library has been changed in what we thought it was a non-breaking change manner, using variadic arguments. But we confirmed that it could be a breaking change in the rare case where the Exec function is assigned to a variable.

// The original Exec function works here because its type is func(context.Context, []string),
// but the new Exec function’s type is func(context.Context, []string, ...ProcessOption),
// so the assignment fails at compile time. For that reason we are moving it to this section.
var execFn func(ctx context.Context, cmd []string) = myContainer.Exec

🚀 Features

  • feat: implement new MultiStrategy design (#580) @hhsnopek

    This PR enhances how the wait.ForAll strategy behaves: it will control the startup timeout and the deadline for all inner wait strategies, using two methods: WithStartupTimeoutDefault, which sets the default timeout for all inner wait strategies; and WithDeadline, which sets a time.Duration which limits all wait strategies. As a consequence, the already existing function WithStartupTimeout has been deprecated from the multi-strategy struct.

  • feat: Auth config for build images (#602) @paulozenida

  • feat: log docker info from compose (#591) @mdelapenya

🐛 Bug Fixes

  • fix: support parallel execution of reusable containers (#593) @mdelapenya

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

v0.15.0

24 Oct 10:11
4c04bdf
Compare
Choose a tag to compare

What's Changed

🚀 Features

⚠️ Breaking Changes

Before this change, when waiting for a SQL to be executed in a container it always checked against localhost, but it could be the case that the database instance runs in a different container. For that reason, the library now supports passing the host where the database is running so that the wait.ForSQL function needs the host as part of the input parameters.

- func ForSQL(port nat.Port, driver string, url func(nat.Port) string) *waitForSql {
+ func ForSQL(port nat.Port, driver string, url func(host string, port nat.Port) string) *waitForSql {

🐛 Bug Fixes

  • fix: check if the container request is for the reaper (#574) @mdelapenya
  • fix: pass docker context key when reusing a container (#550) @mdelapenya
  • fix: use regex to find container by name (#558) @hwwwi
  • fix: expose default exposed ports if the NetworkMode is not container (#560) @clive-jevons
  • fix(compose): wait.ForExit() strategy should work for finished containers (#514) @Malinskiy

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

v0.14.0

13 Sep 14:16
a99f307
Compare
Choose a tag to compare

What's Changed

🚀 Features

⚠️ Breaking Changes

🐛 Bug Fixes

📖 Documentation

  • docs: add contributing guides (#522) @mdelapenya
  • docs: add docs regarding Podman usage (#503) @baez90
  • docs: fix format for create-container feature (#481) @mdelapenya
  • Remove unused import in redis example (#471) @doodot
  • docs: add telegraf to users of testcontainers-go (#447) @powersj
  • chore: update branding (#429) @mdelapenya

🧹 Housekeeping

📦 Dependency updates

  • chore(deps): bump github.com/docker/go-units from 0.4.0 to 0.5.0 (#515) @dependabot
  • chore(deps): bump github.com/lib/pq from 1.10.6 to 1.10.7 in /e2e (#518) @dependabot
  • Update go-redis to v8.11.5 (#424) @johanoskarsson
  • chore(deps): bump gotest.tools/gotestsum from 1.7.0 to 1.8.2 (#499) @dependabot
  • chore(deps): bump github.com/containerd/containerd from 1.6.7 to 1.6.8 (#495) @dependabot
  • chore(deps): bump gotest.tools/gotestsum from 1.8.1 to 1.8.2 in /e2e (#498) @dependabot
  • chore(deps): bump github.com/containerd/containerd from 1.6.6 to 1.6.7 (#494) @dependabot
  • chore(deps): bump github.com/containerd/containerd from 1.5.9 to 1.6.6 (#444) @dependabot
  • chore: retire non-supported Go versions (#493) @mdelapenya
  • chore(deps): bump github.com/stretchr/testify from 1.7.2 to 1.8.0 (#487) @dependabot
  • chore(deps): bump gotest.tools/v3 from 3.2.0 to 3.3.0 (#486) @dependabot
  • chore(deps): bump github.com/cenkalti/backoff/v4 from 4.1.2 to 4.1.3 (#480) @dependabot
  • feat(deps): update dependencies to resolve dependabot security alerts (#484) @purpleclay
  • feat: update 3d party packages (#467) @VladimirStepanov
  • chore(deps): bump gotest.tools/gotestsum from 1.7.0 to 1.8.1 in /e2e (#477) @dependabot
  • chore: tell dependabot about the new module (#474) @mdelapenya
  • chore(deps): bump github.com/magiconair/properties from 1.8.5 to 1.8.6 (#448) @dependabot
  • chore(deps): bump gotest.tools/v3 from 3.0.3 to 3.2.0 (#431) @dependabot
  • chore(deps): bump containerd version to v1.5.13 (#446) @vinijabes

v0.13.0

07 Apr 15:18
7504bdf
Compare
Choose a tag to compare

What's Changed

🚀 Features

  • expose CopyToContainer so file can be created only in memory (#417) @oktalz
  • add ability to stop container (#416) @oktalz
  • Remove custom built docker image on container termination (#405) @gaborszakacs
  • Remove intermediate containers when building from Dockerfile (#403) @gaborszakacs
  • Expose HostConfig Resources via ContainerRequest (#402) @nhatthm
  • Logger per container instance (#393) @baez90
  • added interface for logger (#385) @dhuckins
  • Replace ContainerRequest.BindMounts and ContainerRequest.VolumeMounts with ContainerRequest.Mounts as dedicated type (#386) @baez90
  • feat: additionally remove volumes by default on compose down (#381) @peter-evans
  • Add wait.ExecStrategy to wait on cmd exec in a container (#368) @alexey-medvedchikov

⚠️ Breaking Changes

  • Replace ContainerRequest.BindMounts and ContainerRequest.VolumeMounts with ContainerRequest.Mounts as dedicated type (#386) @baez90

🐛 Bug Fixes

  • Add support for Docker Compose V2 (#377) @artamonovkirill
  • #391: remember service map from all docker compose files (#392) @ankan-pfc
  • Bugfix: log-consumer go-routine should recover from closed-connection (#369) @Chrisss93

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

v0.12.0

19 Nov 12:16
1517941
Compare
Choose a tag to compare

What's Changed

⚠️ Breaking Changes

  • Swap incorrect key and value of BindMounts and VolumeMounts (#354) @Lucaber

🚀 Features

🐛 Bug Fixes

  • Close docker provider client on container terminate (#358) @anjmao

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

  • chore(deps): bump github.com/docker/docker from 20.10.9+incompatible to 20.10.11+incompatible (#383) @dependabot
  • Updated default ryuk image to testcontainers/ryuk:0.3.3. (#376) @silh
  • Bump runc (#378) @benmoss
  • chore(deps): bump mkdocs from 1.0.4 to 1.2.3 (#367) @dependabot
  • chore(deps): bump github.com/docker/docker from 20.10.8+incompatible to 20.10.9+incompatible (#364) @dependabot
  • chore(deps): bump github.com/google/uuid from 1.2.0 to 1.3.0 (#333) @dependabot
  • chore(deps): bump github.com/docker/docker from 20.10.7+incompatible to 20.10.8+incompatible (#340) @dependabot

v0.11.1

24 Jun 11:13
acbbb29
Compare
Choose a tag to compare

What's Changed

🐛 Bug Fixes

📖 Documentation

v0.11.0

01 Jun 09:42
8149ecb
Compare
Choose a tag to compare

What's Changed

  • Retry follow logs request on closed connection (#323) @rmfitzpatrick
  • Add instrumentations for containers created with Dockerfile (#311) @xicoalmeida
  • close reaper go routines on DockerContainer.Terminate & DockerNetwork.Remove (#320) @Eun
  • Wait strategies must poll ports (#295) @programminh

🚀 Features

🐛 Bug Fixes

📦 Dependency updates

v0.10.0

12 Mar 09:43
6467d9b
Compare
Choose a tag to compare

What's Changed

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

v0.9.0

22 Sep 12:26
f11cabd
Compare
Choose a tag to compare

What's Changed

🐛 Bug Fixes

v0.8.0

09 Sep 13:26
8c68827
Compare
Choose a tag to compare

What's Changed

🐛 Bug Fixes

📖 Documentation

🧹 Housekeeping

📦 Dependency updates