Repository: micronaut-projects/micronaut-test
Pull request #948 (2024-02-08 14:51:55)

Testcontainers via test-resources version catalog

sonarcloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=micronaut-projects_micronaut-test&pullRequest=948) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=micronaut-projects_micronaut-test&pullRequest=948&resolved=false&inNewCodePeriod=true)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=micronaut-projects_micronaut-test&pullRequest=948&resolved=false&inNewCodePeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/no-data-16px.png '') No data about Coverage  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/no-data-16px.png '') No data about Duplication  
  
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=micronaut-projects_micronaut-test&pullRequest=948)



Patch:
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index b730e14d..87ac44fc 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -15,7 +15,6 @@ managed-spock = "2.3-groovy-4.0"
 
 kotlin = "1.9.22"
 graal-svm = "23.1.1"
-testcontainers = "1.19.3"
 
 micronaut-test = "4.1.1"
 micronaut-data = "4.4.1"
@@ -26,6 +25,7 @@ micronaut-serde = "2.7.0"
 micronaut-spring = "5.4.0"
 micronaut-sql = "5.4.0"
 micronaut-reactor = "3.2.1"
+micronaut-test-resources = "2.3.3"
 
 micronaut-gradle-plugin = "4.2.1"
 
@@ -42,6 +42,7 @@ micronaut-spring = { module = "io.micronaut.spring:micronaut-spring-bom", versio
 micronaut-sql = { module = "io.micronaut.sql:micronaut-sql-bom", version.ref = "micronaut-sql" }
 micronaut-reactor = { module = 'io.micronaut.reactor:micronaut-reactor-bom', version.ref = "micronaut-reactor" }
 micronaut-test = { module = 'io.micronaut.test:micronaut-test-bom', version.ref = "micronaut-test" }
+micronaut-test-resources = { module = "io.micronaut.testresources:micronaut-test-resources-bom", version.ref = "micronaut-test-resources" }
 
 managed-assertj-core = { module = "org.assertj:assertj-core", version.ref = "managed-assertj" }
 managed-hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "managed-hamcrest" }
@@ -73,7 +74,3 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
 groovy = { module = "org.apache.groovy:groovy" }
 
 kotlin-gradle-plugin = { module = 'org.jetbrains.kotlin:kotlin-gradle-plugin', version.ref = 'kotlin' }
-
-testcontainers-bom = { module = "org.testcontainers:testcontainers-bom", version.ref = "testcontainers" }
-testcontainers = { module = "org.testcontainers:testcontainers" }
-testcontainers-postgresql = { module = "org.testcontainers:postgresql"}
diff --git a/settings.gradle b/settings.gradle
index 64a69bbb..a70f5462 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -18,9 +18,10 @@ micronautBuild {
     importMicronautCatalog("micronaut-serde")
     importMicronautCatalog("micronaut-spring")
     importMicronautCatalog("micronaut-sql")
+    importMicronautCatalog("micronaut-r2dbc")
     importMicronautCatalog("micronaut-reactor")
     importMicronautCatalog("micronaut-test")
-    importMicronautCatalog("micronaut-r2dbc")
+    importMicronautCatalog("micronaut-test-resources")
 }
 
 rootProject.name = 'test-parent'


Test patch:
diff --git a/test-suite-at-sql-jpa/build.gradle.kts b/test-suite-at-sql-jpa/build.gradle.kts
index 8aee0e53..b2f01bfa 100644
--- a/test-suite-at-sql-jpa/build.gradle.kts
+++ b/test-suite-at-sql-jpa/build.gradle.kts
@@ -21,9 +21,7 @@ dependencies {
     testImplementation(projects.micronautTestJunit5)
     testRuntimeOnly(libs.junit.jupiter.engine)
 
-    testImplementation(platform(libs.testcontainers.bom))
-    testImplementation(libs.testcontainers)
-    testImplementation(libs.testcontainers.postgresql)
+    testImplementation(mnTestResources.testcontainers.postgres)
 }
 tasks.withType<Test> {
     useJUnitPlatform()
diff --git a/test-suite-sql-r2dbc/build.gradle.kts b/test-suite-sql-r2dbc/build.gradle.kts
index f23cc672..a81064c1 100644
--- a/test-suite-sql-r2dbc/build.gradle.kts
+++ b/test-suite-sql-r2dbc/build.gradle.kts
@@ -31,6 +31,7 @@ dependencies {
 micronaut {
     importMicronautPlatform.set(false)
     testResources {
+        version.set(libs.versions.micronaut.test.resources)
         additionalModules.add(R2DBC_MYSQL)
     }
 }