Explicit container images and versions
org.openrewrite.java.testing.testcontainers.ExplicitContainerImages
Replace implicit default container images and versions with explicit versions.
Recipe source
GitHub, Issue Tracker, Maven Central
groupId: org.openrewrite.recipe
artifactId: rewrite-testing-frameworks
version: 2.7.0
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
Usage
This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite.recipe:rewrite-testing-frameworks:2.7.0
in your build file or by running a shell command (in which case no build changes are needed):
Add the following to your
build.gradle
file:
Run
gradle rewriteRun
to run the recipe.
Definition
Add image argument to container constructor
containerClass:
org.testcontainers.containers.CassandraContainer
image:
cassandra:3.11.2
Add image argument to container constructor
containerClass:
org.testcontainers.containers.ClickHouseContainer
image:
yandex/clickhouse-server:18.10.3
Add image argument to container constructor
containerClass:
org.testcontainers.containers.CockroachContainer
image:
cockroachdb/cockroach:v19.2.11
Add image argument to container constructor
containerClass:
org.testcontainers.couchbase.CouchbaseContainer
image:
couchbase/server:6.5.1
Add image argument to container constructor
containerClass:
org.testcontainers.containers.Db2Container
image:
ibmcom/db2:11.5.0.0a
Add image argument to container constructor
containerClass:
org.testcontainers.dynamodb.DynaliteContainer
image:
quay.io/testcontainers/dynalite:v1.2.1-1
Add image argument to container constructor
containerClass:
org.testcontainers.elasticsearch.ElasticsearchContainer
image:
docker.elastic.co/elasticsearch/elasticsearch:7.9.2
Add image argument to container constructor
containerClass:
org.testcontainers.containers.InfluxDBContainer
image:
influxdb:1.4.3
Add image argument to container constructor
containerClass:
org.testcontainers.containers.MariaDBContainer
image:
mariadb:10.3.6
Add image argument to container constructor
containerClass:
org.testcontainers.containers.MongoDBContainer
image:
mongo:4.0.10
Add image argument to container constructor
containerClass:
org.testcontainers.containers.MSSQLServerContainer
image:
mcr.microsoft.com/mssql/server:2017-CU12
Add image argument to container constructor
containerClass:
org.testcontainers.containers.MySQLContainer
image:
mysql:5.7.34
Add image argument to container constructor
containerClass:
org.testcontainers.containers.Neo4jContainer
image:
neo4j:4.4
Add image argument to container constructor
containerClass:
org.testcontainers.containers.NginxContainer
image:
nginx:1.9.4
Add image argument to container constructor
containerClass:
org.testcontainers.containers.OracleContainer
image:
gvenzl/oracle-xe:18.4.0-slim
Add image argument to container constructor
containerClass:
org.testcontainers.containers.OrientDBContainer
image:
orientdb:3.0.24-tp3
Add image argument to container constructor
containerClass:
org.testcontainers.containers.PostgreSQLContainer
image:
postgres:9.6.12
Add image argument to container constructor
containerClass:
org.testcontainers.containers.RabbitMQContainer
image:
rabbitmq:3.7.25-management-alpine
Add image argument to container constructor
containerClass:
org.testcontainers.containers.SolrContainer
image:
solr:8.3.0
Add image argument to container constructor
containerClass:
org.testcontainers.containers.ToxiproxyContainer
image:
shopify/toxiproxy:2.1.0
Add image argument to container constructor
containerClass:
org.testcontainers.vault.VaultContainer
image:
vault:1.1.3
Add image argument to container constructor
containerClass:
org.testcontainers.containers.KafkaContainer
image:
confluentinc/cp-kafka:5.4.3
parseImage:
true
Add image argument to container constructor
containerClass:
org.testcontainers.containers.localstack.LocalStackContainer
image:
localstack/localstack:0.11.2
parseImage:
true
Add image argument to container constructor
containerClass:
org.testcontainers.containers.MockServerContainer
image:
jamesdbloom/mockserver:mockserver-5.5.4
parseImage:
true
Add image argument to container constructor
containerClass:
org.testcontainers.containers.PulsarContainer
image:
apachepulsar/pulsar:2.10.0
parseImage:
true
See how this recipe works across multiple open-source repositories
The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.
Contributors
Last updated