Repository: micronaut-projects/micronaut-test
Pull request #1008 (2024-04-17 21:08:59)

fix(deps): update dependency org.graalvm.nativeimage:svm to v23.1.3
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.graalvm.nativeimage:svm](https://togithub.com/oracle/graal/tree/master/substratevm) ([source](https://togithub.com/oracle/graal)) | `23.1.2` -> `23.1.3` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.graalvm.nativeimage:svm/23.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.graalvm.nativeimage:svm/23.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.graalvm.nativeimage:svm/23.1.2/23.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.graalvm.nativeimage:svm/23.1.2/23.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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=1008) **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=1008&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=1008&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=1008&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=1008)



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..efe3c238 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -14,9 +14,9 @@ managed-kotest = "5.8.1"
 managed-spock = "2.3-groovy-4.0"
 
 kotlin = "1.9.23"
-graal-svm = "23.1.2"
+graal-svm = "23.1.3"
 
-micronaut-test = "4.2.1"
+micronaut-test = "4.3.0"
 micronaut-data = "4.6.2"
 micronaut-hibernate-validator = "4.3.0"
 micronaut-logging = "1.1.2"
@@ -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>