From 6b26640809e1332830780992d0dfca6a80d3566d Mon Sep 17 00:00:00 2001 From: vsevel Date: Thu, 23 Feb 2023 12:03:42 +0100 Subject: [PATCH] Document testing native with profile prod and test properties --- .../main/asciidoc/building-native-image.adoc | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/src/main/asciidoc/building-native-image.adoc b/docs/src/main/asciidoc/building-native-image.adoc index e1bd97d3dfab9..e84bd913aa126 100644 --- a/docs/src/main/asciidoc/building-native-image.adoc +++ b/docs/src/main/asciidoc/building-native-image.adoc @@ -311,6 +311,33 @@ executable will contain only the `version.txt` resource, no superfluous test dat The executable built with `-Dquarkus-profile=test` is not suitable for production deployment. It contains your test resources files and settings. Once the testing is done, the executable would have to be built again, using the default, `prod` profile. + +Alternatively, if you need to specify specific properties when running tests against the native executable +built using the `prod` profile, an option is to put those properties in file `src/test/resources/application-nativeit.yaml`, and refer to it from the `failsafe` plugin configuration using the `QUARKUS_CONFIG_LOCATIONS` environment variable. For instance: +``` + + maven-failsafe-plugin + ${surefire-plugin.version} + + + + integration-test + verify + + + + ${project.build.directory}/${project.build.finalName}-runner + org.jboss.logmanager.LogManager + ${maven.home} + + + ./src/test/resources/application-nativeit.yaml + + + + + +``` ==== === Java preview features