Move R2DBC testcontainers support into spring-boot-r2dbc
This commit is contained in:
committed by
Phillip Webb
parent
f2c3d46286
commit
0efac79dbe
@@ -4,6 +4,7 @@ plugins {
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
@@ -21,10 +22,26 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("io.micrometer:micrometer-core")
|
||||
optional("io.r2dbc:r2dbc-pool")
|
||||
optional("io.r2dbc:r2dbc-proxy")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
optional("org.testcontainers:clickhouse")
|
||||
optional("org.testcontainers:jdbc")
|
||||
optional("org.testcontainers:mariadb")
|
||||
optional("org.testcontainers:mssqlserver")
|
||||
optional("org.testcontainers:mysql")
|
||||
optional("org.testcontainers:oracle-xe")
|
||||
optional("org.testcontainers:oracle-free")
|
||||
optional("org.testcontainers:postgresql")
|
||||
optional("org.testcontainers:r2dbc")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
dockerTestRuntimeOnly("com.oracle.database.r2dbc:oracle-r2dbc")
|
||||
|
||||
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
@@ -32,6 +49,7 @@ dependencies {
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-sql")))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-testcontainers")))
|
||||
testImplementation("io.projectreactor:reactor-test")
|
||||
testImplementation("io.r2dbc:r2dbc-h2")
|
||||
testImplementation("org.postgresql:r2dbc-postgresql")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.clickhouse.ClickHouseContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.containers.MariaDBContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.containers.MySQLContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.oracle.OracleContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.containers.OracleContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.testcontainers.containers.MSSQLR2DBCDatabaseContainer;
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for testcontainers R2DBC service connections.
|
||||
*/
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
@@ -1,3 +1,13 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.r2dbc.testcontainers.ClickHouseR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.MariaDbR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.MySqlR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.OracleFreeR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.OracleXeR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.PostgresR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.r2dbc.testcontainers.SqlServerR2dbcContainerConnectionDetailsFactory
|
||||
|
||||
# Database Initializer Detectors
|
||||
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector=\
|
||||
org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializerDetector
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.r2dbc;
|
||||
package org.springframework.boot.r2dbc.testcontainers;
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -11,8 +11,6 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
api(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tx"))
|
||||
@@ -26,31 +24,16 @@ dependencies {
|
||||
dockerTestImplementation("org.junit.platform:junit-platform-launcher")
|
||||
dockerTestImplementation("org.mockito:mockito-core")
|
||||
dockerTestImplementation("org.springframework:spring-core-test")
|
||||
dockerTestImplementation("org.springframework:spring-jdbc")
|
||||
dockerTestImplementation("org.springframework.data:spring-data-redis")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
dockerTestRuntimeOnly("com.oracle.database.r2dbc:oracle-r2dbc")
|
||||
dockerTestRuntimeOnly("com.zaxxer:HikariCP")
|
||||
dockerTestRuntimeOnly("io.lettuce:lettuce-core")
|
||||
dockerTestRuntimeOnly("org.postgresql:postgresql")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
|
||||
optional(project(":spring-boot-project:spring-boot-data-redis"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||
optional("org.springframework:spring-test")
|
||||
optional("org.testcontainers:clickhouse")
|
||||
optional("org.testcontainers:grafana")
|
||||
optional("org.testcontainers:jdbc")
|
||||
optional("org.testcontainers:mariadb")
|
||||
optional("org.testcontainers:mssqlserver")
|
||||
optional("org.testcontainers:mysql")
|
||||
optional("org.testcontainers:oracle-xe")
|
||||
optional("org.testcontainers:oracle-free")
|
||||
optional("org.testcontainers:postgresql")
|
||||
optional("org.testcontainers:r2dbc")
|
||||
optional("com.redis:testcontainers-redis")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
|
||||
@@ -6,12 +6,5 @@ org.springframework.boot.testcontainers.service.connection.otlp.GrafanaOpenTelem
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryLoggingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryMetricsContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryTracingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.ClickHouseR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.MariaDbR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.MySqlR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.OracleFreeR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.OracleXeR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.PostgresR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.SqlServerR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.redis.RedisContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.zipkin.ZipkinContainerConnectionDetailsFactory
|
||||
|
||||
@@ -7,7 +7,7 @@ description = "Spring Boot Data R2DBC with Flyway smoke test"
|
||||
|
||||
dependencies {
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("io.projectreactor:reactor-test")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
@@ -7,7 +7,7 @@ description = "Spring Boot Data R2DBC with Liquibase smoke test"
|
||||
|
||||
dependencies {
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("io.projectreactor:reactor-test")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
Reference in New Issue
Block a user