Skip to content

Commit

Permalink
Testcontainers via test-resources version catalog (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
wetted authored Feb 7, 2024
1 parent 6f18fbf commit 241bb60
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ dependencies {
runtimeOnly(mnFlyway.flyway.mysql)

testImplementation(mn.micronaut.http.client)
testImplementation(platform(libs.testcontainers))
testImplementation(libs.testcontainers.mysql)
testImplementation(mnTestResources.testcontainers.mysql)
testImplementation(mnTest.micronaut.test.core)

runtimeOnly mn.snakeyaml
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ micronaut {
testRuntime "junit"
testResources {
clientTimeout = 300
version = libs.versions.micronaut.testresources.get()
version = libs.versions.micronaut.test.resources.get()
}
}

Expand Down
15 changes: 3 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ managed-r2dbc-mssql = "1.0.2.RELEASE"
# Gradle plugins

micronaut-gradle-plugin = "4.2.1"
micronaut-testresources = "2.3.3"
micronaut-test-resources = "2.3.3"
kotlin-gradle-plugin = "1.9.22"

[libraries]
Expand All @@ -48,11 +48,10 @@ micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.r
micronaut-data = { module = "io.micronaut.data:micronaut-data-bom", version.ref = "micronaut-data" }
micronaut-sql = { module = "io.micronaut.sql:micronaut-sql-bom", version.ref = "micronaut-sql" }
micronaut-flyway = { module = "io.micronaut.flyway:micronaut-flyway-bom", version.ref = "micronaut-flyway" }
micronaut-test-resources = { module = "io.micronaut.testresources:micronaut-test-resources-bom", version.ref = "micronaut-test-resources" }
micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }
micronaut-logging = { module = "io.micronaut.logging:micronaut-logging-bom", version.ref = "micronaut-logging" }

testcontainers = { module = "org.testcontainers:testcontainers-bom", version.ref = "testcontainers" }

# R2DBC API

managed-r2dbc-spi = { module = "io.r2dbc:r2dbc-spi", version.ref = "managed-r2dbc" }
Expand All @@ -67,20 +66,12 @@ managed-r2dbc-io-asyncer-mysql = { module = "io.asyncer:r2dbc-mysql", version.re
managed-r2dbc-mssql = { module = "io.r2dbc:r2dbc-mssql", version.ref = "managed-r2dbc-mssql" }
managed-r2dbc-postgresql = { module = "org.postgresql:r2dbc-postgresql", version.ref = "managed-r2dbc-postgresql" }

testcontainers-jdbc = { module = "org.testcontainers:jdbc" }
testcontainers-junit-jupiter = { module = "org.testcontainers:junit-jupiter" }
testcontainers-mariadb = { module = "org.testcontainers:mariadb" }
testcontainers-mssqlserver = { module = "org.testcontainers:mssqlserver" }
testcontainers-mysql = { module = "org.testcontainers:mysql" }
testcontainers-oracle = { module = "org.testcontainers:oracle-xe" }
testcontainers-postgresql = { module = "org.testcontainers:postgresql" }
testcontainers-r2dbc = { module = "org.testcontainers:r2dbc" }
testcontainers-spock = { module = "org.testcontainers:spock" }

junit-platform-engine = { module = "org.junit.platform:junit-platform-suite-engine" }
# Testresources

micronaut-testresources-client = { module = 'io.micronaut.testresources:micronaut-test-resources-client', version.ref = "micronaut-testresources" }
micronaut-testresources-client = { module = 'io.micronaut.testresources:micronaut-test-resources-client', version.ref = "micronaut-test-resources" }

# Gradle

Expand Down
13 changes: 6 additions & 7 deletions r2dbc-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,33 @@ dependencies {
testImplementation(mn.micronaut.management)

testImplementation(mnRxjava2.micronaut.rxjava2)
testImplementation(libs.testcontainers.r2dbc)
testImplementation(platform(libs.testcontainers))
testImplementation(mnTestResources.testcontainers.r2dbc)

// mariadb
testImplementation(libs.managed.r2dbc.mariadb)
testImplementation(libs.testcontainers.mariadb)
testImplementation(mnTestResources.testcontainers.mariadb)
testImplementation(mnSql.mariadb.java.client)

// mysql
testImplementation(libs.testcontainers.mysql)
testImplementation(mnTestResources.testcontainers.mysql)
testImplementation(mnSql.mysql.connector.java)
testImplementation(libs.managed.r2dbc.mysql)

// h2
testImplementation(libs.managed.r2dbc.h2)

// sqlserver
testImplementation(libs.testcontainers.mssqlserver)
testImplementation(mnTestResources.testcontainers.mssql)
testImplementation(mnSql.mssql.jdbc)
testImplementation(libs.managed.r2dbc.mssql)

// postgres
testImplementation(libs.managed.r2dbc.postgresql)
testImplementation(libs.testcontainers.postgresql)
testImplementation(mnTestResources.testcontainers.postgres)
testImplementation(mnSql.postgresql)

// oracle
testImplementation(libs.testcontainers.oracle)
testImplementation(mnTestResources.testcontainers.oracle.xe)
testImplementation(mnSql.ojdbc11)
testImplementation(libs.managed.r2dbc.oracle)

Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ micronautBuild {
importMicronautCatalog("micronaut-data")
importMicronautCatalog("micronaut-sql")
importMicronautCatalog("micronaut-flyway")
importMicronautCatalog("micronaut-test-resources")
importMicronautCatalog("micronaut-validation")
}
rootProject.name = 'r2dbc-parent'
Expand Down
2 changes: 1 addition & 1 deletion test-graalvm/common-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {
implementation(mn.micronaut.http.client)
implementation(mnTest.micronaut.test.junit5)
implementation(libs.micronaut.testresources.client)
implementation(platform(libs.testcontainers))
testImplementation(platform(mnTestResources.boms.testcontainers))
implementation(libs.testcontainers.junit.jupiter)

}

0 comments on commit 241bb60

Please sign in to comment.