github testcontainers/testcontainers-java 1.15.0

latest releases: 1.20.3, 1.20.2, 1.20.1...
4 years ago

What's Changed

Notable changes from previous release candidates (1.15.0-rc1, 1.15.0-rc2) are called out in these release notes. If migrating from 1.14.3, please see the RC release notes for other changes.

๐Ÿš€ Features & Enhancements

Included in 1.15.0-rc2

  • Add image compatibility checks (#3021) @rnorth
    The majority of modules make assumptions about the container image being used - for example, port numbers, expected log lines, etc. When asking users to provide their own images with modules, it is potentially confusing if the provided image diverges from the original 'vendor-provided' image that the module was built to support.

    This change is intended to ensure that, if the user provides their own image that is not the same as the vendor-provided one, they are given adequate warning and forced to signal that this is intentional.

    For example:

    • new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:any")) will just work, because confluentinc/cp-kafka matches the image name that KafkaContainer was designed to work with
    • but new KafkaContainer(DockerImageName.parse("some-other-kafka")) will not work immediately, because some-other-kafka may be an entirely divergent image from confluentinc/cp-kafka. In this case, the user would be prompted to add .asCompatibleSubstituteFor("confluentinc/cp-kafka") which tells Testcontainers that this is a conscious decision

    This PR adds to DockerImageName:

    • asCompatibleSubstituteFor(DockerImageName) and asCompatibleSubstituteFor(String) methods which may be used to claim compatibility with a vendor-provided image
    • isCompatibleWith(DockerImageName) and assertCompatibleWith(DockerImageName) methods which can be used by Testcontainers to check that the provided image is compatible with the expected vendor-provided image

Included in 1.15.0-rc1

  • Add a rootless Docker strategy (#2985) @bsideup. This allows Testcontainers to be used with Docker's rootless mode. All Testcontainers' features and modules are compatible with Docker rootless mode, but we would appreciate feedback on unidentified edge cases.

  • Deprecate ambiguous constructors (#2839) @rnorth. This change affects the majority of constructors for container classes. This is intended to encourage users to specify an exact docker image and tag for dependencies, rather than relying on a (potentially outdated) default image chosen by Testcontainers.

    • new XyzContainer()-style and new XyzContainer(String)-style constructors are deprecated throughout, in favour of a strongly typed new XyzContainer(DockerImageName)-style constructor.
    • Users should identify an appropriate Docker image for their test dependencies, and use as follows: new XyzContainer( DockerImageName.parse( "the/image:tag" ) ).
    • We expect to make some further improvements in this area before the final 1.15.0 release.
  • Un-shade docker-java-api (#2882) @bsideup. This change follows some significant refactoring of the docker-java library, and should resolve various issues associated with shading of dependencies.

  • New optional transport based on Apache HttpClient5. This is a very promising transport that most probably will become the default in future versions of Testcontainers. You can give it a try by putting transport.type = httpclient5 to $HOME/.testcontainers.properties.

โš ๏ธ Breaking API changes

Included in 1.15.0-rc1

While we expect that the vast majority of users will notice no difference, these changes can be considered breaking, so warrant special mention:

Other improvements

  • Refactor TestcontainersConfiguration to allow config by env var (#3411) @rnorth
  • Elasticsearch: Add withPassword(String) method for secure access (#2321) @dadoonet
  • Vault: add a fluent API for configuring Vault's logging level (#2231) @fullkomnun
  • Add gcloud endpoint accessors (#3344) @rnorth
  • docker-machine: get full remote daemon URL, to allow for use of custom daemon port (#2769) (#3237) @vcvitaly
  • Allow users to specify a MongoDB database name (#2980) @silaev
  • Presto: Bump default Presto version (used in deprecated constructor and unversioned JDBC URL) from 329 to 344 (#3312) @findepi
  • Reduce severity of warning for failed auth config lookups (fixes #1399) (#3353) @DevilzOwn
  • When an image version is not specified, use latest as the default tag (#3313) @rnorth
  • Don't display a stack trace in the logs when .testcontainers.properties is not found (#2293) @rishumehrotra

๐Ÿ› Bug Fixes

๐Ÿ“– Documentation

๐Ÿงน Housekeeping

๐Ÿ“ฆ Dependency updates

Click to expand...
  • Bump s3 from 2.15.9 to 2.15.14 in /modules/localstack (#3388) @dependabot
  • Bump mockito-core from 3.5.13 to 3.5.15 in /modules/junit-jupiter (#3387) @dependabot
  • Bump assertj-core from 3.17.2 to 3.18.0 in /modules/junit-jupiter (#3386) @dependabot
  • Bump assertj-core from 3.17.2 to 3.18.0 in /modules/neo4j (#3385) @dependabot
  • Bump assertj-core from 3.17.2 to 3.18.0 in /modules/vault (#3384) @dependabot
  • Bump postgresql from 42.2.17 to 42.2.18 in /modules/junit-jupiter (#3369) @dependabot
  • Bump aws-java-sdk-sqs from 1.11.880 to 1.11.884 in /modules/localstack (#3377) @dependabot
  • Bump guava from 29.0-jre to 30.0-jre in /core (#3371) @dependabot
  • Bump mysql-connector-java from 8.0.21 to 8.0.22 in /modules/junit-jupiter (#3370) @dependabot
  • Bump postgresql from 42.2.17 to 42.2.18 in /examples (#3367) @dependabot
  • Bump postgresql from 42.2.17 to 42.2.18 in /modules/spock (#3362) @dependabot
  • Bump s3 from 2.15.7 to 2.15.9 in /modules/localstack (#3361) @dependabot
  • Bump lombok from 1.18.14 to 1.18.16 in /examples (#3368) @dependabot
  • Bump aws-java-sdk-s3 from 1.11.880 to 1.11.882 in /modules/localstack (#3365) @dependabot
  • Bump mssql-jdbc from 8.4.1.jre8 to 9.1.0.jre8-preview in /modules/mssqlserver (#3364) @dependabot
  • Bump mysql-connector-java from 8.0.21 to 8.0.22 in /modules/spock (#3363) @dependabot
  • Bump mysql-connector-java from 8.0.21 to 8.0.22 in /modules/jdbc-test (#3360) @dependabot
  • Bump guava from 29.0-jre to 30.0-jre in /modules/jdbc-test (#3359) @dependabot
  • Bump mysql-connector-java from 8.0.21 to 8.0.22 in /modules/mysql (#3357) @dependabot
  • Bump postgresql from 42.2.17 to 42.2.18 in /modules/postgresql (#3358) @dependabot
  • Bump aws-java-sdk-dynamodb from 1.11.880 to 1.11.882 in /modules/dynalite (#3356) @dependabot
  • Bump cucumber-java from 6.6.0 to 6.8.1 in /examples (#3324) @dependabot
  • Bump s3 from 2.14.21 to 2.15.7 in /modules/localstack (#3335) @dependabot
  • Bump zt-exec from 1.10 to 1.12 in /core (#3253) @dependabot
  • Bump aws-java-sdk-s3 from 1.11.870 to 1.11.880 in /modules/localstack (#3336) @dependabot
  • Bump org.springframework.boot from 2.3.3.RELEASE to 2.3.4.RELEASE in /examples (#3247) @dependabot
  • Bump cucumber-junit from 6.7.0 to 6.8.1 in /examples (#3325) @dependabot
  • Bump httpclient from 4.5.12 to 4.5.13 in /modules/spock (#3329) @dependabot
  • Bump httpclient from 4.5.12 to 4.5.13 in /modules/junit-jupiter (#3326) @dependabot
  • Bump aws-java-sdk-sqs from 1.11.860 to 1.11.880 in /modules/localstack (#3337) @dependabot
  • Bump postgresql from 42.2.16 to 42.2.17 in /modules/postgresql (#3334) @dependabot
  • Bump tomcat-jdbc from 9.0.37 to 9.0.39 in /modules/jdbc (#3333) @dependabot
  • Bump postgresql from 42.2.16 to 42.2.17 in /modules/spock (#3330) @dependabot
  • Bump postgresql from 42.2.16 to 42.2.17 in /modules/junit-jupiter (#3327) @dependabot
  • Bump postgresql from 42.2.16 to 42.2.17 in /examples (#3323) @dependabot
  • Bump solr-solrj from 8.6.2 to 8.6.3 in /examples (#3321) @dependabot
  • Bump mariadb-java-client from 2.6.2 to 2.7.0 in /modules/mariadb (#3278) @dependabot
  • Bump junit from 4.13 to 4.13.1 in /examples (#3328) @dependabot
  • Bump tomcat-jdbc from 9.0.37 to 9.0.39 in /modules/jdbc-test (#3338) @dependabot
  • Bump mockito-core from 3.5.11 to 3.5.13 in /modules/junit-jupiter (#3283) @dependabot
  • Bump elasticsearch-rest-client from 7.9.1 to 7.9.2 in /modules/elasticsearch (#3276) @dependabot
  • Bump mockito-core from 3.5.11 to 3.5.13 in /core (#3275) @dependabot
  • Bump aws-java-sdk-dynamodb from 1.11.865 to 1.11.880 in /modules/dynalite (#3332) @dependabot
  • Bump assertj-core from 3.17.1 to 3.17.2 in /core (#3251) @dependabot
  • Bump testng from 7.2.0 to 7.3.0 in /examples (#3068) @dependabot
  • Bump r2dbc-mariadb from 0.8.3-beta1 to 0.8.4-rc in /modules/mariadb (#3300) @dependabot
  • Bump lombok from 1.18.12 to 1.18.14 in /examples (#3322) @dependabot
  • Bump snakeyaml from 1.25 to 1.27 in /core (#3252) @dependabot

Don't miss a new testcontainers-java release

NewReleases is sending notifications on new releases.