Repository: micronaut-projects/micronaut-test
Pull request #1011 (2024-04-20 20:10:48)

fix(deps): update dependency io.micronaut.testresources:micronaut-test-resources-bom to v2.5.0
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.micronaut.testresources:micronaut-test-resources-bom](https://micronaut.io) ([source](https://togithub.com/micronaut-projects/micronaut-test-resources)) | `2.4.0` -> `2.5.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/io.micronaut.testresources:micronaut-test-resources-bom/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.micronaut.testresources:micronaut-test-resources-bom/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.micronaut.testresources:micronaut-test-resources-bom/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.micronaut.testresources:micronaut-test-resources-bom/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>micronaut-projects/micronaut-test-resources (io.micronaut.testresources:micronaut-test-resources-bom)</summary>

### [`v2.5.0`](https://togithub.com/micronaut-projects/micronaut-test-resources/releases/tag/v2.5.0): Micronaut Test Resources 2.5.0

<!-- Release notes generated using configuration in .github/release.yml at 2.5.x -->

#### What's Changed

##### Improvements ⭐

-   feat([#&#8203;571](https://togithub.com/micronaut-projects/micronaut-test-resources/issues/571)): TestResourcesPropertiesFactory supports user defined meta annotations by [@&#8203;ArnauAregall](https://togithub.com/ArnauAregall) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/572](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/572)
-   Support OpenSearch in testResources by [@&#8203;timyates](https://togithub.com/timyates) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/567](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/567)

##### Dependency updates 🚀

-   Update versions by [@&#8203;sdelamo](https://togithub.com/sdelamo) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/585](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/585)
-   fix(deps): update vertx.client to v4.5.7 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/560](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/560)
-   fix(deps): update testcontainers-java monorepo to v1.19.7 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/550](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/550)

##### AWS SDK v2

-   fix(deps): update aws-java-sdk-v2 monorepo to v2.25.19 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/548](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/548)
-   fix(deps): update aws-java-sdk-v2 monorepo to v2.25.26 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/573](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/573)

##### AWS SDK v1

-   fix(deps): update aws-java-sdk monorepo to v1.12.671 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/546](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/546)
-   fix(deps): update aws-java-sdk monorepo to v1.12.688 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/549](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/549)
-   fix(deps): update aws-java-sdk monorepo to v1.12.693 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/570](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/570)
-   fix(deps): update aws-java-sdk monorepo to v1.12.696 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/579](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/579)

##### Kotlin

-   chore(deps): update plugin org.jetbrains.kotlin.jvm to v1.9.23 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/553](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/553)

##### KSP

-   chore(deps): update plugin com.google.devtools.ksp to v1.9.23-1.0.19 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/551](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/551)
-   chore(deps): update plugin com.google.devtools.ksp to v1.9.23-1.0.20 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/583](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/583)

##### Micronaut Modules

##### Micronaut Core

-   fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.4.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/559](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/559)
-   fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.4.1 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/584](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/584)

##### Micronaut Serialization

-   fix(deps): update dependency io.micronaut.serde:micronaut-serde-bom to v2.8.2 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/558](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/558)

##### Micronaut SQL

-   fix(deps): update dependency io.micronaut.sql:micronaut-sql-bom to v5.5.2 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/566](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/566)

##### Micronaut Neo4J

-   fix(deps): update dependency io.micronaut.neo4j:micronaut-neo4j-bom to v6.4.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/562](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/562)

##### Micronaut AWS

-   fix(deps): update dependency io.micronaut.aws:micronaut-aws-bom to v4.4.3 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/554](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/554)
-   fix(deps): update dependency io.micronaut.aws:micronaut-aws-bom to v4.5.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/586](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/586)

##### Micronaut Elastic Search

-   fix(deps): update dependency io.micronaut.elasticsearch:micronaut-elasticsearch-bom to v5.4.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/576](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/576)

##### Micronaut Security

-   fix(deps): update dependency io.micronaut.security:micronaut-security-bom to v4.6.9 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/556](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/556)

##### Micronaut Reactor

-   fix(deps): update dependency io.micronaut.reactor:micronaut-reactor-bom to v3.3.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/574](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/574)

##### Micronaut Kafka

-   fix(deps): update dependency io.micronaut.kafka:micronaut-kafka-bom to v5.4.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/578](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/578)

##### CI ⚙️Build 🐘

-   chore(deps): update actions/checkout action to v4 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/538](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/538)
-   chore(deps): update gradle/wrapper-validation-action action to v2 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/531](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/531)
-   chore(deps): update gradle/gradle-build-action action to v3.2.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/581](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/581)

##### Micronaut Build Plugin

-   chore(deps): update plugin io.micronaut.build.shared.settings to v6.6.4 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/545](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/545)
-   chore(deps): update plugin io.micronaut.build.shared.settings to v6.7.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/561](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/561)

##### Micronaut Gradle Plugin

-   chore(deps): update micronaut.gradle.plugin to v4.3.4 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/544](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/544)
-   chore(deps): update micronaut.gradle.plugin to v4.3.5 - autoclosed by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/565](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/565)
-   chore(deps): update micronaut.gradle.plugin to v4.3.6 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/582](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/582)

##### Other Changes 💡

-   Fix tests by [@&#8203;alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/micronaut-projects/micronaut-test-resources/pull/547](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/547)

#### New Contributors

-   [@&#8203;ArnauAregall](https://togithub.com/ArnauAregall) made their first contribution in [https://github.com/micronaut-projects/micronaut-test-resources/pull/572](https://togithub.com/micronaut-projects/micronaut-test-resources/pull/572)

**Full Changelog**: https://github.com/micronaut-projects/micronaut-test-resources/compare/v2.4.0...v2.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm" in timezone Europe/Prague, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/micronaut-projects/micronaut-test).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoiNC40LngiLCJsYWJlbHMiOlsidHlwZTogZGVwZW5kZW5jeS11cGdyYWRlIl19-->


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=1011) **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=1011&resolved=false&inNewCodePeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/component_measures?id=micronaut-projects_micronaut-test&pullRequest=1011&metric=new_accepted_issues&view=list)

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=1011&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=1011)



Patch:
diff --git a/.github/workflows/central-sync.yml b/.github/workflows/central-sync.yml
index dd1f3514..23b80ba2 100644
--- a/.github/workflows/central-sync.yml
+++ b/.github/workflows/central-sync.yml
@@ -18,7 +18,7 @@ jobs:
         uses: actions/checkout@v4
         with:
           ref: v${{ github.event.inputs.release_version }}
-      - uses: gradle/wrapper-validation-action@v2
+      - uses: gradle/wrapper-validation-action@v3
       - name: Set up JDK
         uses: actions/setup-java@v4
         with:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3a4bd1cb..065ee562 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,7 +17,7 @@ jobs:
         uses: actions/checkout@v4
         with:
           token: ${{ secrets.GH_TOKEN }}
-      - uses: gradle/wrapper-validation-action@v2
+      - uses: gradle/wrapper-validation-action@v3
       - name: Set up JDK
         uses: actions/setup-java@v4
         with:
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 9a1a7276..cde43bb6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -25,7 +25,7 @@ micronaut-serde = "2.9.0"
 micronaut-spring = "5.5.0"
 micronaut-sql = "5.6.0"
 micronaut-reactor = "3.3.0"
-micronaut-test-resources = "2.4.0"
+micronaut-test-resources = "2.5.0"
 
 micronaut-gradle-plugin = "4.3.6"
 


Test patch:
diff --git a/test-rest-assured/src/main/java/io/micronaut/test/rest/assured/RequestSpecificationFactory.java b/test-rest-assured/src/main/java/io/micronaut/test/rest/assured/RequestSpecificationFactory.java
index 5ce4f9fc..1b1e0022 100644
--- a/test-rest-assured/src/main/java/io/micronaut/test/rest/assured/RequestSpecificationFactory.java
+++ b/test-rest-assured/src/main/java/io/micronaut/test/rest/assured/RequestSpecificationFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-2022 original authors
+ * Copyright 2017-2024 original authors
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,20 +16,23 @@
 package io.micronaut.test.rest.assured;
 
 import io.micronaut.context.annotation.Factory;
+import io.micronaut.context.annotation.Property;
 import io.micronaut.context.annotation.Prototype;
 import io.micronaut.context.annotation.Requires;
 import io.micronaut.runtime.server.EmbeddedServer;
 import io.restassured.RestAssured;
 import io.restassured.specification.RequestSpecification;
 
+import static io.micronaut.test.support.server.TestEmbeddedServer.PROPERTY;
+
 /**
  * Helper class making it easier to create request specifications.
  *
  * @author gkrocher
- * @since 3.4.0 
+ * @since 3.4.0
  */
 @Factory
-@Requires(beans = EmbeddedServer.class) 
+@Requires(beans = EmbeddedServer.class)
 public class RequestSpecificationFactory {
 
     /**
@@ -37,10 +40,20 @@ public class RequestSpecificationFactory {
      * @return A request specification for the current server.
      */
     @Prototype
-    @Requires(beans = EmbeddedServer.class) 
+    @Requires(beans = EmbeddedServer.class, missingProperty = PROPERTY)
     RequestSpecification requestSpecification(EmbeddedServer embeddedServer) {
         return RestAssured.given()
             .port(embeddedServer.getPort());
     }
 
+    /**
+     * @param url The optional URL for an external service
+     * @return A request specification for the external server.
+     */
+    @Prototype
+    @Requires(property = PROPERTY)
+    RequestSpecification requestSpecificationWithURL(@Property(name = PROPERTY) String url) {
+        return RestAssured.given()
+            .baseUri(url);
+    }
 }
diff --git a/test-rest-assured/src/test/java/io/micronaut/test/rest/assured/RestAssuredExternalServerTest.java b/test-rest-assured/src/test/java/io/micronaut/test/rest/assured/RestAssuredExternalServerTest.java
new file mode 100644
index 00000000..9400192e
--- /dev/null
+++ b/test-rest-assured/src/test/java/io/micronaut/test/rest/assured/RestAssuredExternalServerTest.java
@@ -0,0 +1,30 @@
+package io.micronaut.test.rest.assured;
+
+import io.micronaut.context.annotation.Property;
+import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
+import io.restassured.specification.RequestSpecification;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.hasSize;
+
+@MicronautTest
+@Property(name = "micronaut.test.server.url", value = "https://jsonplaceholder.typicode.com")
+class RestAssuredExternalServerTest {
+
+    @Test
+    void testSinglePost(RequestSpecification spec) {
+        spec
+            .when().get("/posts/1")
+            .then().statusCode(200)
+            .body("title", is("sunt aut facere repellat provident occaecati excepturi optio reprehenderit"));
+    }
+
+    @Test
+    void testUsers(RequestSpecification spec) {
+        spec
+            .when().get("/users")
+            .then().statusCode(200)
+            .body("id", hasSize(10));
+    }
+}
diff --git a/test-rest-assured/src/test/resources/logback.xml b/test-rest-assured/src/test/resources/logback.xml
new file mode 100644
index 00000000..44b79c40
--- /dev/null
+++ b/test-rest-assured/src/test/resources/logback.xml
@@ -0,0 +1,14 @@
+<configuration>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- encoders are assigned the type
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="info">
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>