From dc3b9d2ed56bf210ac466da8bf3305853219727d Mon Sep 17 00:00:00 2001 From: Romain Grecourt Date: Mon, 5 Aug 2024 19:54:22 -0700 Subject: [PATCH] Packaging Integration Tests Refactor tests/integration/native-image into a more general "packaging" test suite. --- .github/workflows/validate.yml | 85 ++++++- etc/scripts/test-packaging-jar.sh | 75 ------ etc/scripts/test-packaging-jlink.sh | 85 ------- etc/scripts/test-packaging-native.sh | 82 ------ tests/integration/native-image/mp-1/README.md | 40 --- tests/integration/native-image/mp-1/pom.xml | 117 --------- .../native-image.properties | 20 -- tests/integration/native-image/mp-2/README.md | 25 -- tests/integration/native-image/mp-3/README.md | 21 -- tests/integration/native-image/mp-3/pom.xml | 87 ------- tests/integration/native-image/se-1/pom.xml | 119 --------- tests/integration/packaging/mp-1/README.md | 44 ++++ .../mp-1/logging.properties | 2 +- .../mp-1/mp-config-test.yaml | 2 +- .../mp-1/mp-config.yaml | 2 +- tests/integration/packaging/mp-1/pom.xml | 227 +++++++++++++++++ .../packaging}/mp1/AutoFilter.java | 4 +- .../packaging}/mp1/BasicAuthApplication.java | 4 +- .../integration/packaging}/mp1/BeanClass.java | 4 +- .../packaging}/mp1/BeanProducer.java | 6 +- .../packaging}/mp1/JaxRsApplicationCdi.java | 4 +- .../packaging}/mp1/JaxRsApplicationNoCdi.java | 4 +- .../mp1/JaxRsApplicationNoClasses.java | 4 +- .../mp1/JaxRsProtectedResource.java | 4 +- .../packaging}/mp1/JaxRsResource.java | 4 +- .../packaging}/mp1/JwtAuthApplication.java | 4 +- .../packaging}/mp1/LivenessHealthcheck.java | 4 +- .../integration/packaging}/mp1/Mp1Main.java | 8 +- .../packaging}/mp1/OidcApplication.java | 4 +- .../packaging}/mp1/ReadinessHealthcheck.java | 4 +- .../packaging}/mp1/RestClientIface.java | 4 +- .../integration/packaging}/mp1/TestBean.java | 8 +- .../integration/packaging}/mp1/TestDto.java | 4 +- .../packaging}/mp1/other/BeanProcessor.java | 4 +- .../packaging}/mp1/other/ProducedBean.java | 4 +- .../packaging}/mp1/other/package-info.java | 4 +- .../packaging/mp1}/package-info.java | 6 +- .../mp-1/src/main/java/module-info.java | 16 +- .../src/main/resources/META-INF/beans.xml | 0 .../microprofile-config-test.properties | 2 +- .../META-INF/microprofile-config.properties | 4 +- .../native-image.properties | 2 +- .../src/main/resources/logging.properties | 2 +- .../src/main/resources/mp-meta-config.yaml | 4 +- .../mp-1/src/main/resources/sign-jwk.json | 0 .../mp-1/src/main/resources/verify-jwk.json | 0 .../mp-1/src/main/resources/web/resource.txt | 0 .../mp-1/src/main/resources/web/welcome.txt | 0 .../packaging/mp1/Mp1JarClassPathTestIT.java | 33 +++ .../packaging/mp1/Mp1JarModulePathTestIT.java | 33 +++ .../mp1/Mp1JlinkModulePathTestIT.java | 33 +++ .../packaging/mp1/Mp1JlinkTestIT.java | 33 +++ .../packaging/mp1/Mp1NativeTestIT.java | 33 +++ .../packaging/mp1/Mp1PackagingTestIT.java | 45 ++++ .../mp-1/web/resource.txt | 0 tests/integration/packaging/mp-2/README.md | 31 +++ .../{native-image => packaging}/mp-2/pom.xml | 131 +++++++++- .../packaging}/mp2/GreetingEntity.java | 12 +- .../packaging}/mp2/JaxRsResource.java | 4 +- .../integration/packaging}/mp2/Mp2Main.java | 5 +- .../packaging/mp2}/package-info.java | 6 +- .../src/main/resources/META-INF/beans.xml | 0 .../META-INF/microprofile-config.properties | 8 +- .../native-image.properties | 2 +- .../main/resources/META-INF/persistence.xml | 5 +- .../src/main/resources/logging.properties | 4 +- .../packaging/mp2/Mp2JarClassPathTestIT.java | 33 +++ .../packaging/mp2/Mp2JlinkTestIT.java | 33 +++ .../packaging/mp2/Mp2NativeTestIT.java | 33 +++ .../packaging/mp2/Mp2PackagingTestIT.java | 73 ++++++ .../mp-2/src/test/resources}/init.sql | 2 + tests/integration/packaging/mp-3/README.md | 8 + tests/integration/packaging/mp-3/pom.xml | 196 +++++++++++++++ .../packaging}/mp3/GreetResource.java | 4 +- .../packaging}/mp3/GreetingProvider.java | 4 +- .../integration/packaging}/mp3/Mp3Main.java | 5 +- .../packaging}/mp3/RoutingService.java | 4 +- .../packaging}/mp3/package-info.java | 4 +- .../mp-3/src/main/java/module-info.java | 10 +- .../src/main/resources/META-INF/beans.xml | 0 .../microprofile-config-test.properties | 2 +- .../META-INF/microprofile-config.properties | 2 +- .../native-image.properties | 17 ++ .../src/main/resources/logging.properties | 0 .../packaging/mp3/Mp3JarClassPathTestIT.java | 38 +++ .../packaging/mp3/Mp3JarModulePathTestIT.java | 38 +++ .../mp3/Mp3JlinkModulePathTestIT.java | 38 +++ .../packaging/mp3/Mp3JlinkTestIT.java | 38 +++ .../packaging/mp3/Mp3NativeTestIT.java | 38 +++ .../packaging/mp3/Mp3PackagingTestIT.java | 64 +++++ .../{native-image => packaging}/pom.xml | 8 +- tests/integration/packaging/se-1/README.md | 8 + .../se-1/conf/overrides.yaml | 2 +- tests/integration/packaging/se-1/pom.xml | 234 ++++++++++++++++++ .../integration/packaging}/se1/Animal.java | 4 +- .../packaging}/se1/GreetService.java | 21 +- .../packaging}/se1/MockZipkinService.java | 52 ++-- .../integration/packaging}/se1/Se1Main.java | 30 ++- .../packaging}/se1/WebClientService.java | 8 +- .../packaging}/se1/WebSocketEndpoint.java | 4 +- .../resource-config.json | 0 .../se-1/src/main/resources/application.yaml | 6 +- .../src/main/resources/logging.properties | 0 .../se-1/src/main/resources/web/resource.txt | 0 .../packaging/se1/Se1JarClassPathTestIT.java | 38 +++ .../packaging/se1/Se1JlinkTestIT.java | 38 +++ .../packaging/se1/Se1NativeTestIT.java | 38 +++ .../packaging/se1/Se1PackagingTestIT.java | 65 +++++ .../se-1/web/resource.txt | 0 .../static-content/pom.xml | 11 +- .../packaging}/staticcontent/Dummy.java | 4 +- .../src/main/resources/web-jar/resource.txt | 0 tests/integration/pom.xml | 9 +- 113 files changed, 1955 insertions(+), 886 deletions(-) delete mode 100755 etc/scripts/test-packaging-jar.sh delete mode 100755 etc/scripts/test-packaging-jlink.sh delete mode 100755 etc/scripts/test-packaging-native.sh delete mode 100644 tests/integration/native-image/mp-1/README.md delete mode 100644 tests/integration/native-image/mp-1/pom.xml delete mode 100644 tests/integration/native-image/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-1/native-image.properties delete mode 100644 tests/integration/native-image/mp-2/README.md delete mode 100644 tests/integration/native-image/mp-3/README.md delete mode 100644 tests/integration/native-image/mp-3/pom.xml delete mode 100644 tests/integration/native-image/se-1/pom.xml create mode 100644 tests/integration/packaging/mp-1/README.md rename tests/integration/{native-image => packaging}/mp-1/logging.properties (96%) rename tests/integration/{native-image => packaging}/mp-1/mp-config-test.yaml (92%) rename tests/integration/{native-image => packaging}/mp-1/mp-config.yaml (96%) create mode 100644 tests/integration/packaging/mp-1/pom.xml rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/AutoFilter.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/BasicAuthApplication.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/BeanClass.java (92%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/BeanProducer.java (82%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JaxRsApplicationCdi.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JaxRsApplicationNoCdi.java (89%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JaxRsApplicationNoClasses.java (89%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JaxRsProtectedResource.java (91%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JaxRsResource.java (97%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/JwtAuthApplication.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/LivenessHealthcheck.java (92%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/Mp1Main.java (99%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/OidcApplication.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/ReadinessHealthcheck.java (92%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/RestClientIface.java (93%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/TestBean.java (94%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/TestDto.java (91%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/other/BeanProcessor.java (90%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/other/ProducedBean.java (92%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging}/mp1/other/package-info.java (85%) rename tests/integration/{native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2 => packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1}/package-info.java (77%) rename tests/integration/{native-image => packaging}/mp-1/src/main/java/module-info.java (79%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/META-INF/beans.xml (100%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/META-INF/microprofile-config-test.properties (91%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/META-INF/microprofile-config.properties (89%) rename tests/integration/{native-image/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-3 => packaging/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp1}/native-image.properties (88%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/logging.properties (95%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/mp-meta-config.yaml (91%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/sign-jwk.json (100%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/verify-jwk.json (100%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/web/resource.txt (100%) rename tests/integration/{native-image => packaging}/mp-1/src/main/resources/web/welcome.txt (100%) create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarClassPathTestIT.java create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarModulePathTestIT.java create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkModulePathTestIT.java create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkTestIT.java create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1NativeTestIT.java create mode 100644 tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1PackagingTestIT.java rename tests/integration/{native-image => packaging}/mp-1/web/resource.txt (100%) create mode 100644 tests/integration/packaging/mp-2/README.md rename tests/integration/{native-image => packaging}/mp-2/pom.xml (54%) rename tests/integration/{native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging}/mp2/GreetingEntity.java (86%) rename tests/integration/{native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging}/mp2/JaxRsResource.java (96%) rename tests/integration/{native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging}/mp2/Mp2Main.java (96%) rename tests/integration/{native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1 => packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2}/package-info.java (76%) rename tests/integration/{native-image => packaging}/mp-2/src/main/resources/META-INF/beans.xml (100%) rename tests/integration/{native-image => packaging}/mp-2/src/main/resources/META-INF/microprofile-config.properties (68%) rename tests/integration/{native-image/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-2 => packaging/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp2}/native-image.properties (88%) rename tests/integration/{native-image => packaging}/mp-2/src/main/resources/META-INF/persistence.xml (87%) rename tests/integration/{native-image => packaging}/mp-2/src/main/resources/logging.properties (94%) create mode 100644 tests/integration/packaging/mp-2/src/test/java/io/helidon/tests/integration/packaging/mp2/Mp2JarClassPathTestIT.java create mode 100644 tests/integration/packaging/mp-2/src/test/java/io/helidon/tests/integration/packaging/mp2/Mp2JlinkTestIT.java create mode 100644 tests/integration/packaging/mp-2/src/test/java/io/helidon/tests/integration/packaging/mp2/Mp2NativeTestIT.java create mode 100644 tests/integration/packaging/mp-2/src/test/java/io/helidon/tests/integration/packaging/mp2/Mp2PackagingTestIT.java rename tests/integration/{native-image/mp-2 => packaging/mp-2/src/test/resources}/init.sql (67%) create mode 100644 tests/integration/packaging/mp-3/README.md create mode 100644 tests/integration/packaging/mp-3/pom.xml rename tests/integration/{native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging}/mp3/GreetResource.java (97%) rename tests/integration/{native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging}/mp3/GreetingProvider.java (92%) rename tests/integration/{native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging}/mp3/Mp3Main.java (89%) rename tests/integration/{native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging}/mp3/RoutingService.java (92%) rename tests/integration/{native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage => packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging}/mp3/package-info.java (84%) rename tests/integration/{native-image => packaging}/mp-3/src/main/java/module-info.java (68%) rename tests/integration/{native-image => packaging}/mp-3/src/main/resources/META-INF/beans.xml (100%) rename tests/integration/{native-image => packaging}/mp-3/src/main/resources/META-INF/microprofile-config-test.properties (90%) rename tests/integration/{native-image => packaging}/mp-3/src/main/resources/META-INF/microprofile-config.properties (92%) create mode 100644 tests/integration/packaging/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp-3/native-image.properties rename tests/integration/{native-image => packaging}/mp-3/src/main/resources/logging.properties (100%) create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarClassPathTestIT.java create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarModulePathTestIT.java create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkModulePathTestIT.java create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkTestIT.java create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3NativeTestIT.java create mode 100644 tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3PackagingTestIT.java rename tests/integration/{native-image => packaging}/pom.xml (84%) create mode 100644 tests/integration/packaging/se-1/README.md rename tests/integration/{native-image => packaging}/se-1/conf/overrides.yaml (91%) create mode 100644 tests/integration/packaging/se-1/pom.xml rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/Animal.java (91%) rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/GreetService.java (85%) rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/MockZipkinService.java (51%) rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/Se1Main.java (81%) rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/WebClientService.java (94%) rename tests/integration/{native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage => packaging/se-1/src/main/java/io/helidon/tests/integration/packaging}/se1/WebSocketEndpoint.java (92%) rename tests/integration/{native-image/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-se-1 => packaging/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-se-1}/resource-config.json (100%) rename tests/integration/{native-image => packaging}/se-1/src/main/resources/application.yaml (89%) rename tests/integration/{native-image => packaging}/se-1/src/main/resources/logging.properties (100%) rename tests/integration/{native-image => packaging}/se-1/src/main/resources/web/resource.txt (100%) create mode 100644 tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JarClassPathTestIT.java create mode 100644 tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JlinkTestIT.java create mode 100644 tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1NativeTestIT.java create mode 100644 tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1PackagingTestIT.java rename tests/integration/{native-image => packaging}/se-1/web/resource.txt (100%) rename tests/integration/{native-image => packaging}/static-content/pom.xml (75%) rename tests/integration/{native-image/static-content/src/main/java/io/helidon/tests/integration/nativeimage => packaging/static-content/src/main/java/io/helidon/tests/integration/packaging}/staticcontent/Dummy.java (84%) rename tests/integration/{native-image => packaging}/static-content/src/main/resources/web-jar/resource.txt (100%) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2d0e0449e29..fbb9be5b363 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -134,7 +134,7 @@ jobs: cache: maven - uses: graalvm/setup-graalvm@v1 with: - java-version: 21 + java-version: '21' distribution: graalvm-community github-token: ${{ secrets.GITHUB_TOKEN }} native-image-job-reports: true @@ -211,31 +211,92 @@ jobs: -f archetypes/pom.xml \ install packaging: - timeout-minutes: 60 + timeout-minutes: 30 + strategy: + matrix: + os: [ ubuntu-20.04, macos-14 ] + packaging: [ jar, jlink ] + include: + - { os: ubuntu-20.04, platform: linux } + - { os: macos-14, platform: macos } + runs-on: ${{ matrix.os }} + name: tests/packaging-${{ matrix.packaging }}-${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4.1.0 + with: + distribution: ${{ env.JAVA_DISTRO }} + java-version: ${{ env.JAVA_VERSION }} + cache: maven + - name: Free Space + shell: bash + run: | + # See https://github.com/actions/runner-images/issues/2840 + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/share/powershell + - name: Build Helidon + run: | + # prime build + mvn ${MAVEN_ARGS} -e \ + -DskipTests \ + -Ptests \ + install + - name: Run Test + run: | + mvn ${MAVEN_ARGS} \ + -f tests/integration/packaging/pom.xml \ + -P${{ matrix.packaging }}-image \ + verify + native-image: + timeout-minutes: 30 strategy: matrix: - os: [ ubuntu-20.04, macos-14] + os: [ ubuntu-20.04, macos-14 ] + module: [ mp-1, mp-2, mp-3, se-1 ] + include: + - { os: ubuntu-20.04, platform: linux } + - { os: macos-14, platform: macos } runs-on: ${{ matrix.os }} + name: tests/native-image-${{ matrix.module }}-${{ matrix.platform }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - uses: graalvm/setup-graalvm@v1 with: - java-version: 21 + java-version: ${{ env.JAVA_VERSION }} distribution: graalvm-community github-token: ${{ secrets.GITHUB_TOKEN }} native-image-job-reports: true cache: maven + - name: Free Space + shell: bash + run: | + # See https://github.com/actions/runner-images/issues/2840 + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/share/powershell - name: Build Helidon run: | # prime build mvn ${MAVEN_ARGS} -e \ - -Dmaven.test.skip=true \ -DskipTests \ - -Ppipeline \ + -Ptests \ install - - name: JAR packaging - run: etc/scripts/test-packaging-jar.sh - - name: JLink packaging - run: etc/scripts/test-packaging-jlink.sh - - name: Native-Image packaging - run: etc/scripts/test-packaging-native.sh + - name: Run Test + run: | + mvn ${MAVEN_ARGS} -e \ + -f tests/integration/packaging/pom.xml \ + -pl ${{ matrix.module }} \ + -Pnative-image \ + -am \ + verify + gate: + runs-on: ubuntu-20.04 + needs: [ copyright, checkstyle, shellcheck, build, docs, spotbugs, packaging, native-image, archetypes, mp-tck ] + steps: + - shell: bash + run: | + echo OK diff --git a/etc/scripts/test-packaging-jar.sh b/etc/scripts/test-packaging-jar.sh deleted file mode 100755 index e3deeebfb5f..00000000000 --- a/etc/scripts/test-packaging-jar.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2021, 2024 Oracle and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -o pipefail || true # trace ERR through pipes -set -o errtrace || true # trace ERR through commands and functions -set -o errexit || true # exit the script if any statement returns a non-true return value - -on_error(){ - CODE="${?}" && \ - set +x && \ - printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \ - "${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}" -} -trap on_error ERR - -# Path to this script -if [ -h "${0}" ] ; then - SCRIPT_PATH="$(readlink "${0}")" -else - # shellcheck disable=SC155 - SCRIPT_PATH="${0}" -fi -readonly SCRIPT_PATH - -# Path to the root of the workspace -# shellcheck disable=SC2046 -WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P) -readonly WS_DIR - -# Run native image tests -cd "${WS_DIR}/tests/integration/native-image" - -# Prime build all native-image tests -# shellcheck disable=SC2086 -mvn ${MAVEN_ARGS} -e clean install - -# Run tests with classpath and then module path - -# -# Run MP-1 -# -cd "${WS_DIR}/tests/integration/native-image/mp-1" -# Classpath -java -jar target/helidon-tests-native-image-mp-1.jar - -# Module Path -java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ - --module helidon.tests.nimage.mp - -# -# Run MP-3 (just start and stop) -# -cd "${WS_DIR}/tests/integration/native-image/mp-3" -# Classpath -java -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar - -# Module Path -java -Dexit.on.started=! \ - --module-path target/helidon-tests-native-image-mp-3.jar:target/libs \ - --add-modules helidon.tests.nimage.quickstartmp \ - --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/etc/scripts/test-packaging-jlink.sh b/etc/scripts/test-packaging-jlink.sh deleted file mode 100755 index 3675332168e..00000000000 --- a/etc/scripts/test-packaging-jlink.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2021, 2024 Oracle and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -o pipefail || true # trace ERR through pipes -set -o errtrace || true # trace ERR through commands and functions -set -o errexit || true # exit the script if any statement returns a non-true return value - -on_error(){ - CODE="${?}" && \ - set +x && \ - printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \ - "${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}" -} -trap on_error ERR - -# Path to this script -if [ -h "${0}" ] ; then - SCRIPT_PATH="$(readlink "${0}")" -else - # shellcheck disable=SC155 - SCRIPT_PATH="${0}" -fi -readonly SCRIPT_PATH - -# Path to the root of the workspace -# shellcheck disable=SC2046 -WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P) -readonly WS_DIR - -# Run native image tests -cd "${WS_DIR}/tests/integration/native-image" - -# Prime build all native-image tests -# shellcheck disable=SC2086 -mvn ${MAVEN_ARGS} -e clean install - -# Build jlink images -# mp-2 fails because of https://github.com/oracle/helidon-build-tools/issues/478 -readonly native_image_tests="mp-1 mp-3" -for native_test in ${native_image_tests}; do - cd "${WS_DIR}/tests/integration/native-image/${native_test}" - # shellcheck disable=SC2086 - mvn ${MAVEN_ARGS} package -e -Pjlink-image,staging -Djlink.image.addClassDataSharingArchive=false -Djlink.image.testImage=false -done - -# Run tests with classpath and then module path - -# Run MP-1 -cd "${WS_DIR}/tests/integration/native-image/mp-1" -jri_dir="${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1-jri" - -# Classpath -"${jri_dir}"/bin/start - -# Module Path -"${jri_dir}"/bin/java \ - --module-path "${jri_dir}/app/helidon-tests-native-image-mp-1.jar:${jri_dir}/app/libs" \ - --module helidon.tests.nimage.mp - -# Run MP-3 (just start and stop) -cd "${WS_DIR}/tests/integration/native-image/mp-3" -jri_dir=${WS_DIR}/tests/integration/native-image/mp-3/target/helidon-tests-native-image-mp-3-jri - -# Classpath -"${jri_dir}"/bin/start --test - -# Module Path -"${jri_dir}"/bin/java -Dexit.on.started=! \ - --module-path "${jri_dir}/app/helidon-tests-native-image-mp-3.jar:${jri_dir}/app/libs" \ - --add-modules helidon.tests.nimage.quickstartmp \ - --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/etc/scripts/test-packaging-native.sh b/etc/scripts/test-packaging-native.sh deleted file mode 100755 index e5b5da63f33..00000000000 --- a/etc/scripts/test-packaging-native.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2021, 2024 Oracle and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -o pipefail || true # trace ERR through pipes -set -o errtrace || true # trace ERR through commands and functions -set -o errexit || true # exit the script if any statement returns a non-true return value - -on_error(){ - CODE="${?}" && \ - set +x && \ - printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \ - "${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}" -} -trap on_error ERR - -# Path to this script -if [ -h "${0}" ] ; then - SCRIPT_PATH="$(readlink "${0}")" -else - # shellcheck disable=SC155 - SCRIPT_PATH="${0}" -fi -readonly SCRIPT_PATH - -# Path to the root of the workspace -# shellcheck disable=SC2046 -WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P) -readonly WS_DIR - -if [ -z "${GRAALVM_HOME}" ]; then - echo "ERROR: GRAALVM_HOME is not set"; - exit 1 -fi - -if [ ! -x "${GRAALVM_HOME}/bin/native-image" ]; then - echo "ERROR: ${GRAALVM_HOME}/bin/native-image does not exist or is not executable"; - exit 1 -fi - -# shellcheck disable=SC2086 -mvn ${MAVEN_ARGS} --version - -echo "GRAALVM_HOME=${GRAALVM_HOME}"; -"${GRAALVM_HOME}"/bin/native-image --version; - -# Run native image tests -cd "${WS_DIR}/tests/integration/native-image" - -# Prime build all native-image tests -# shellcheck disable=SC2086 -mvn ${MAVEN_ARGS} -e clean install - -# Build native images -readonly native_image_tests="se-1 mp-1 mp-3" -for native_test in ${native_image_tests}; do - cd "${WS_DIR}/tests/integration/native-image/${native_test}" - # shellcheck disable=SC2086 - mvn ${MAVEN_ARGS} -e clean package -Pnative-image -done - -# Run this one because it has no pre-reqs and self-tests -# Uses relative path to read configuration -cd "${WS_DIR}/tests/integration/native-image/mp-1" -./target/helidon-tests-native-image-mp-1 || true - -# Run se-1 exiting on started -cd "${WS_DIR}/tests/integration/native-image/se-1" -./target/helidon-tests-native-image-se-1 -Dexit.on.started=! || true diff --git a/tests/integration/native-image/mp-1/README.md b/tests/integration/native-image/mp-1/README.md deleted file mode 100644 index 88293667f3d..00000000000 --- a/tests/integration/native-image/mp-1/README.md +++ /dev/null @@ -1,40 +0,0 @@ -#GraalVM native image integration test -_____ - -This is a manual (for the time being) test of integration with native-image. - -To run this test: - -```shell script -mvn clean package -Dnative.image=$path_to_native_image -./target/native-image -``` - -There are a tests run from within the application. -Tests: -1. Injection of Config - - -To run using module-path: -```shell script -java --module-path target/libs:target/helidon-tests-native-image-mp-1.jar -m helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main -``` - -To build native image using Helidon feature tracing (with maven): -Add a file `META-INF/native-image/native-image.properties` with the following content: - -```properties -Args=-Dhelidon.native.reflection.trace=true -Dhelidon.native.reflection.trace-parsing=true -``` - -To build native image using Helidon feature tracing (without maven): -```shell script -${GRAALVM_HOME}/bin/native-image -Dhelidon.native.reflection.trace-parsing=true \ - -Dhelidon.native.reflection.trace=true \ - -H:Path=./target \ - -H:Name=helidon-tests-native-image-mp-1 \ - -H:+ReportExceptionStackTraces \ - -jar ./target/helidon-tests-native-image-mp-1.jar -``` - - \ No newline at end of file diff --git a/tests/integration/native-image/mp-1/pom.xml b/tests/integration/native-image/mp-1/pom.xml deleted file mode 100644 index c1405fe9ff4..00000000000 --- a/tests/integration/native-image/mp-1/pom.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - 4.0.0 - - io.helidon.applications - helidon-mp - 4.1.0-SNAPSHOT - ../../../../applications/mp/pom.xml - - io.helidon.tests.integration.native-image - helidon-tests-native-image-mp-1 - Helidon Tests Integration GraalVM Native image MP1 - - - This test makes sure the following helidon modules can be compiled into native image: - Microprofile CDI - Microprofile - Server - Microprofile Tracing - Jaeger Tracer - Microprofile Access Log - Microprofile Fault Tolerance - Microprofile - Metrics - Microprofile Health Check - Microprofile Rest Client - Microprofile Config - YAML configuration - JSON-P - - JSON-B - Microprofile JWT-Auth - - - - io.helidon.tests.integration.nativeimage.mp1.Mp1Main - - - - - io.helidon.microprofile.bundles - helidon-microprofile - - - helidon-microprofile-tracing - io.helidon.microprofile.tracing - - - io.helidon.security.providers - helidon-security-providers-oidc - - - io.helidon.tracing.providers - helidon-tracing-providers-jaeger - runtime - - - io.helidon.microprofile - helidon-microprofile-access-log - runtime - - - io.helidon.metrics - helidon-metrics - runtime - - - io.smallrye - jandex - runtime - - - org.junit.jupiter - junit-jupiter-api - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-libs - - - - - io.smallrye - jandex-maven-plugin - - - make-index - - - - - org.graalvm.buildtools - native-maven-plugin - - - build-native-image - - true - - - - - - - diff --git a/tests/integration/native-image/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-1/native-image.properties b/tests/integration/native-image/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-1/native-image.properties deleted file mode 100644 index f53634fa17d..00000000000 --- a/tests/integration/native-image/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-1/native-image.properties +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) 2023, 2024 Oracle and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -Args=--initialize-at-build-time=io.helidon.tests.integration.nativeimage.mp1 \ - --initialize-at-build-time=io.helidon.common.features \ - --initialize-at-build-time=io.helidon.jersey.client.JerseyClientBuilderListener \ - --initialize-at-build-time=io.helidon.logging.jul.JulMdcPropagator diff --git a/tests/integration/native-image/mp-2/README.md b/tests/integration/native-image/mp-2/README.md deleted file mode 100644 index 2ca98b112ad..00000000000 --- a/tests/integration/native-image/mp-2/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# GraalVM native image integration test MP-2 -_____ - -## Build - -```shell -mvn clean package -Pnative-image -``` - -## Run - -Start the database: -```shell -docker run -it --rm \ - -name oracledb \ - -e ORACLE_PWD=oracle \ - -v $PWD/init.sql:/opt/oracle/scripts/startup/init.sql \ - -p 1521:1521 \ - container-registry.oracle.com/database/express:latest -``` - -Run the application: -```shell -./target/helidon-tests-native-image-mp-2 -``` diff --git a/tests/integration/native-image/mp-3/README.md b/tests/integration/native-image/mp-3/README.md deleted file mode 100644 index 7ec45a652f1..00000000000 --- a/tests/integration/native-image/mp-3/README.md +++ /dev/null @@ -1,21 +0,0 @@ -#GraalVM native image integration test MP-3 -_____ - -This is a manual (for the time being) test of integration with native-image. - -To run this test: - -```shell script -export GRAALVM_HOME=${path.to.graal.with.native-image} -mvn clean package -Pnative-image -./target/helidon-tests-native-image-mp-3 -``` - -Requires at least GraalVM 20.0.0 - -This test validates that Quickstart can run on native image with minimal number of changes - eventually with no changes. - -To run this test using module path: -```shell script -java --module-path target/libs:target/helidon-tests-native-image-mp-3.jar --add-modules helidon.tests.nimage.quickstartmp -m io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main -``` diff --git a/tests/integration/native-image/mp-3/pom.xml b/tests/integration/native-image/mp-3/pom.xml deleted file mode 100644 index 597c24f49e0..00000000000 --- a/tests/integration/native-image/mp-3/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - 4.0.0 - - io.helidon.applications - helidon-mp - 4.1.0-SNAPSHOT - ../../../../applications/mp/pom.xml - - io.helidon.tests.integration.native-image - helidon-tests-native-image-mp-3 - Helidon Tests Integration GraalVM Native image MP3 - - - This test uses quickstart application with minimal number of changes - - - - io.helidon.tests.integration.nativeimage.mp3.Mp3Main - - - - - io.helidon.microprofile.bundles - helidon-microprofile - - - io.smallrye - jandex - runtime - true - - - org.junit.jupiter - junit-jupiter-api - test - - - - - - - org.graalvm.buildtools - native-maven-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-libs - - - - - io.smallrye - jandex-maven-plugin - - - make-index - - - - - - diff --git a/tests/integration/native-image/se-1/pom.xml b/tests/integration/native-image/se-1/pom.xml deleted file mode 100644 index 63293350462..00000000000 --- a/tests/integration/native-image/se-1/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - 4.0.0 - - io.helidon.applications - helidon-se - 4.1.0-SNAPSHOT - ../../../../applications/se/pom.xml - - io.helidon.tests.integration.native-image - helidon-tests-native-image-se-1 - Helidon Tests Integration GraalVM Native image SE 1 - - - io.helidon.tests.integration.nativeimage.se1.Se1Main - - - - - io.helidon.webserver - helidon-webserver - - - io.helidon.webserver - helidon-webserver-static-content - - - io.helidon.webserver - helidon-webserver-websocket - - - io.helidon.http.media - helidon-http-media-jsonp - - - io.helidon.http.media - helidon-http-media-jsonb - - - io.helidon.config - helidon-config-yaml - - - io.helidon.tracing - helidon-tracing - - - io.helidon.tracing.providers - helidon-tracing-providers-zipkin - - - io.helidon.webserver.observe - helidon-webserver-observe-health - - - io.helidon.webclient - helidon-webclient - - - helidon-webclient-tracing - io.helidon.webclient - - - io.helidon.common - helidon-common-reactive - - - io.helidon.logging - helidon-logging-common - - - io.helidon.tests.integration - helidon-tests-native-image-static-content - ${project.version} - - - io.helidon.logging - helidon-logging-jul - runtime - - - org.junit.jupiter - junit-jupiter-api - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-libs - - - - - - diff --git a/tests/integration/packaging/mp-1/README.md b/tests/integration/packaging/mp-1/README.md new file mode 100644 index 00000000000..cad0c5da6a0 --- /dev/null +++ b/tests/integration/packaging/mp-1/README.md @@ -0,0 +1,44 @@ +# Packaging Integration Test MP1 + +This test makes sure the following helidon modules can be compiled into native image: +- Microprofile CDI +- Microprofile Server +- Microprofile Tracing +- Jaeger Tracer +- Microprofile Access Log +- Microprofile Fault Tolerance +- Microprofile Metrics +- Microprofile Health Check +- Microprofile Rest Client +- Microprofile Config +- YAML configuration +- JSON-P +- JSON-B +- Microprofile JWT-Auth + +To run this test: +```shell +mvn clean verify +mvn clean verify -Pnative-image +mvn clean verify -Pjlink-image +``` + +--- + +To build native image using Helidon feature tracing (with maven): +Add a file `META-INF/native-image/native-image.properties` with the following content: + +```properties +Args=-Dhelidon.native.reflection.trace=true -Dhelidon.native.reflection.trace-parsing=true +``` + +To build native image using Helidon feature tracing (without maven): +```shell +native-image \ + -Dhelidon.native.reflection.trace-parsing=true \ + -Dhelidon.native.reflection.trace=true \ + -H:Path=./target \ + -H:Name=helidon-tests-packaging-mp-1 \ + -H:+ReportExceptionStackTraces \ + -jar ./target/helidon-tests-packaging-mp-1.jar +``` diff --git a/tests/integration/native-image/mp-1/logging.properties b/tests/integration/packaging/mp-1/logging.properties similarity index 96% rename from tests/integration/native-image/mp-1/logging.properties rename to tests/integration/packaging/mp-1/logging.properties index bf0c057c7fe..adb0aebdc26 100644 --- a/tests/integration/native-image/mp-1/logging.properties +++ b/tests/integration/packaging/mp-1/logging.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2023 Oracle and/or its affiliates. +# Copyright (c) 2018, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/native-image/mp-1/mp-config-test.yaml b/tests/integration/packaging/mp-1/mp-config-test.yaml similarity index 92% rename from tests/integration/native-image/mp-1/mp-config-test.yaml rename to tests/integration/packaging/mp-1/mp-config-test.yaml index 8edd223834c..2d19304d017 100644 --- a/tests/integration/native-image/mp-1/mp-config-test.yaml +++ b/tests/integration/packaging/mp-1/mp-config-test.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2021 Oracle and/or its affiliates. +# Copyright (c) 2019, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/native-image/mp-1/mp-config.yaml b/tests/integration/packaging/mp-1/mp-config.yaml similarity index 96% rename from tests/integration/native-image/mp-1/mp-config.yaml rename to tests/integration/packaging/mp-1/mp-config.yaml index 1fd77ee6890..17f8329a380 100644 --- a/tests/integration/native-image/mp-1/mp-config.yaml +++ b/tests/integration/packaging/mp-1/mp-config.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023 Oracle and/or its affiliates. +# Copyright (c) 2020, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/packaging/mp-1/pom.xml b/tests/integration/packaging/mp-1/pom.xml new file mode 100644 index 00000000000..c499ce8f17b --- /dev/null +++ b/tests/integration/packaging/mp-1/pom.xml @@ -0,0 +1,227 @@ + + + + + 4.0.0 + + io.helidon.applications + helidon-mp + 4.1.0-SNAPSHOT + ../../../../applications/mp/pom.xml + + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging-mp-1 + Helidon Tests Integration Packaging MP1 + + + io.helidon.tests.integration.packaging.mp1.Mp1Main + true + + + + + io.helidon.microprofile.bundles + helidon-microprofile + + + helidon-microprofile-tracing + io.helidon.microprofile.tracing + + + io.helidon.security.providers + helidon-security-providers-oidc + + + io.helidon.inject + helidon-inject-runtime + true + + + io.helidon.tracing.providers + helidon-tracing-providers-jaeger + runtime + + + io.helidon.microprofile + helidon-microprofile-access-log + runtime + + + io.helidon.metrics + helidon-metrics + runtime + + + io.smallrye + jandex + runtime + + + io.helidon.logging + helidon-logging-jul + + + org.junit.jupiter + junit-jupiter-api + test + + + org.hamcrest + hamcrest-all + test + + + io.helidon.tests.integration + helidon-tests-integration-harness + ${project.version} + test + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-libs + + + + + io.smallrye + jandex-maven-plugin + + + make-index + + + + + org.graalvm.buildtools + native-maven-plugin + + + build-native-image + + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IT + + + + ${project.build.outputDirectory}/logging.properties + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + ${project.build.outputDirectory}/logging.properties + + + ${redirectTestOutputToFile} + + + + + integration-test + verify + + + + + + + + + + jar-image + + true + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jar*IT + + + + + + + + native-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Native*IT + + + + + + + + jlink-image + + + + io.helidon.build-tools + helidon-maven-plugin + + false + false + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jlink*IT + + + + + + + + diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/AutoFilter.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/AutoFilter.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/AutoFilter.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/AutoFilter.java index 38c01fffc73..bbae78fe82e 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/AutoFilter.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/AutoFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.concurrent.atomic.AtomicInteger; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BasicAuthApplication.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BasicAuthApplication.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BasicAuthApplication.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BasicAuthApplication.java index 2cacdc20dd7..ab70949c310 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BasicAuthApplication.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BasicAuthApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.Set; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanClass.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanClass.java similarity index 92% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanClass.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanClass.java index fdad307bddf..0561ac41ac6 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanClass.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.context.RequestScoped; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanProducer.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanProducer.java similarity index 82% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanProducer.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanProducer.java index fa69df95f43..7c70f58d6a8 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/BeanProducer.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/BeanProducer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Produces; -import io.helidon.tests.integration.nativeimage.mp1.other.ProducedBean; +import io.helidon.tests.integration.packaging.mp1.other.ProducedBean; @ApplicationScoped public class BeanProducer { diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationCdi.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationCdi.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationCdi.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationCdi.java index acdeb65cc3e..c2676888a1c 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationCdi.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationCdi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.Set; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoCdi.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoCdi.java similarity index 89% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoCdi.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoCdi.java index 4aa615393f7..c968df8d043 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoCdi.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoCdi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.Set; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoClasses.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoClasses.java similarity index 89% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoClasses.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoClasses.java index d4b2d660be3..ca4e14900b1 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsApplicationNoClasses.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsApplicationNoClasses.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.enterprise.context.ApplicationScoped; import jakarta.ws.rs.ApplicationPath; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsProtectedResource.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsProtectedResource.java similarity index 91% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsProtectedResource.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsProtectedResource.java index 9859dd0f3b5..ab6e5233c27 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsProtectedResource.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsProtectedResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.annotation.security.PermitAll; import jakarta.annotation.security.RolesAllowed; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsResource.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsResource.java similarity index 97% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsResource.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsResource.java index 645ab9fd345..5e76dc174d3 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JaxRsResource.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JaxRsResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.lang.System.Logger.Level; import java.lang.reflect.Field; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JwtAuthApplication.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JwtAuthApplication.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JwtAuthApplication.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JwtAuthApplication.java index c5fb927ac69..9e1e650b3e5 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/JwtAuthApplication.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/JwtAuthApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.Set; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/LivenessHealthcheck.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/LivenessHealthcheck.java similarity index 92% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/LivenessHealthcheck.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/LivenessHealthcheck.java index 1382bf4037d..e9b19649baf 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/LivenessHealthcheck.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/LivenessHealthcheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/Mp1Main.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/Mp1Main.java similarity index 99% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/Mp1Main.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/Mp1Main.java index 302b3caa3ed..2df25015bed 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/Mp1Main.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/Mp1Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -129,7 +129,7 @@ private static String generateJwtToken() { .addUserGroup("admin") .addScope("admin_scope") .algorithm(JwkRSA.ALG_RS256) - .issuer("native-image-mp1") + .issuer("helidon-tests-packaging-mp1") .addAudience("http://localhost:8087/jwt") .issueTime(Instant.now()) .userPrincipal("jack") @@ -564,7 +564,7 @@ private static void validateMetrics(Errors.Collector collector, WebTarget target .request(MediaType.APPLICATION_JSON) .get(JsonObject.class); - JsonObject timer = application.getJsonObject("io.helidon.tests.integration.nativeimage.mp1.TestBean.config"); + JsonObject timer = application.getJsonObject("io.helidon.tests.integration.packaging.mp1.TestBean.config"); if (null == timer) { collector.fatal("Timer for TestBean.config() is not present in metrics result"); } else { diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/OidcApplication.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/OidcApplication.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/OidcApplication.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/OidcApplication.java index 9f21d644278..48100095e3d 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/OidcApplication.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/OidcApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.util.Set; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/ReadinessHealthcheck.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/ReadinessHealthcheck.java similarity index 92% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/ReadinessHealthcheck.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/ReadinessHealthcheck.java index 29d9830c345..c703ca082d5 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/ReadinessHealthcheck.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/ReadinessHealthcheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/RestClientIface.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/RestClientIface.java similarity index 93% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/RestClientIface.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/RestClientIface.java index a7e02d017d4..f23b748ec63 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/RestClientIface.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/RestClientIface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import jakarta.json.JsonObject; import jakarta.ws.rs.GET; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestBean.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestBean.java similarity index 94% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestBean.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestBean.java index 29c1e0a82bb..ba0f4ce1006 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestBean.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import java.net.URI; import java.time.temporal.ChronoUnit; @@ -26,8 +26,8 @@ import jakarta.inject.Inject; import io.helidon.microprofile.server.ServerCdiExtension; -import io.helidon.tests.integration.nativeimage.mp1.other.BeanProcessor; -import io.helidon.tests.integration.nativeimage.mp1.other.ProducedBean; +import io.helidon.tests.integration.packaging.mp1.other.BeanProcessor; +import io.helidon.tests.integration.packaging.mp1.other.ProducedBean; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.faulttolerance.Asynchronous; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestDto.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestDto.java similarity index 91% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestDto.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestDto.java index 5d4e231ec06..ffed7000c5c 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/TestDto.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/TestDto.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp1; import io.helidon.common.Reflected; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/BeanProcessor.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/BeanProcessor.java similarity index 90% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/BeanProcessor.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/BeanProcessor.java index cd669c8e4e3..2544ca0721c 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/BeanProcessor.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/BeanProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1.other; +package io.helidon.tests.integration.packaging.mp1.other; public final class BeanProcessor { diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/ProducedBean.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/ProducedBean.java similarity index 92% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/ProducedBean.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/ProducedBean.java index 710c60ce822..dbdd5897ad6 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/ProducedBean.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/ProducedBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp1.other; +package io.helidon.tests.integration.packaging.mp1.other; import java.util.Objects; diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/package-info.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/package-info.java similarity index 85% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/package-info.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/package-info.java index e2c09cfbd69..aec2030469c 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/other/package-info.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/other/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * This package exists to make sure we can do proxies that have working * package local */ -package io.helidon.tests.integration.nativeimage.mp1.other; \ No newline at end of file +package io.helidon.tests.integration.packaging.mp1.other; \ No newline at end of file diff --git a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/package-info.java b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/package-info.java similarity index 77% rename from tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/package-info.java rename to tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/package-info.java index a7d3a03cd5d..d8656db30e9 100644 --- a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/package-info.java +++ b/tests/integration/packaging/mp-1/src/main/java/io/helidon/tests/integration/packaging/mp1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ * limitations under the License. */ /** - * Application to test GraalVM native-image with Helidon MP. + * Helidon Tests Integration Packaging MP1. */ -package io.helidon.tests.integration.nativeimage.mp2; +package io.helidon.tests.integration.packaging.mp1; diff --git a/tests/integration/native-image/mp-1/src/main/java/module-info.java b/tests/integration/packaging/mp-1/src/main/java/module-info.java similarity index 79% rename from tests/integration/native-image/mp-1/src/main/java/module-info.java rename to tests/integration/packaging/mp-1/src/main/java/module-info.java index d99ace56449..e9c5163e584 100644 --- a/tests/integration/native-image/mp-1/src/main/java/module-info.java +++ b/tests/integration/packaging/mp-1/src/main/java/module-info.java @@ -15,9 +15,10 @@ */ /** - * Application to test GraalVM native-image with Helidon MP. + * Helidon Tests Integration Packaging MP1. */ -module helidon.tests.nimage.mp { +@SuppressWarnings("removal") +module io.helidon.tests.integration.packaging.mp.one { requires io.helidon.microprofile.server; requires io.helidon.security.abac.scope; @@ -40,12 +41,15 @@ // never reach health check CDI extension requires io.helidon.health.checks; - exports io.helidon.tests.integration.nativeimage.mp1; - exports io.helidon.tests.integration.nativeimage.mp1.other; + // needed to compile injection generated classes + requires static io.helidon.inject.runtime; + + exports io.helidon.tests.integration.packaging.mp1; + exports io.helidon.tests.integration.packaging.mp1.other; // opens is needed to inject private fields, create classes in the same package (proxy) - opens io.helidon.tests.integration.nativeimage.mp1; - opens io.helidon.tests.integration.nativeimage.mp1.other; + opens io.helidon.tests.integration.packaging.mp1; + opens io.helidon.tests.integration.packaging.mp1.other; // we need to open the static resource on classpath directory to everybody, as otherwise // static content will not see it diff --git a/tests/integration/native-image/mp-1/src/main/resources/META-INF/beans.xml b/tests/integration/packaging/mp-1/src/main/resources/META-INF/beans.xml similarity index 100% rename from tests/integration/native-image/mp-1/src/main/resources/META-INF/beans.xml rename to tests/integration/packaging/mp-1/src/main/resources/META-INF/beans.xml diff --git a/tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config-test.properties b/tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config-test.properties similarity index 91% rename from tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config-test.properties rename to tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config-test.properties index 6e53ae07943..d09ce1c409c 100644 --- a/tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config-test.properties +++ b/tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config-test.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2023 Oracle and/or its affiliates. +# Copyright (c) 2019, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config.properties b/tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config.properties similarity index 89% rename from tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config.properties rename to tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config.properties index 8e491508d95..d5a17f82f33 100644 --- a/tests/integration/native-image/mp-1/src/main/resources/META-INF/microprofile-config.properties +++ b/tests/integration/packaging/mp-1/src/main/resources/META-INF/microprofile-config.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2023 Oracle and/or its affiliates. +# Copyright (c) 2019, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ app.jaxrs.number=142 %test.app.jaxrs.number=42 mp.jwt.verify.publickey.location=/verify-jwk.json -mp.jwt.verify.issuer=native-image-mp1 +mp.jwt.verify.issuer=helidon-tests-packaging-mp1 tracing.service=mp1 tracing.global=false diff --git a/tests/integration/native-image/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-3/native-image.properties b/tests/integration/packaging/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp1/native-image.properties similarity index 88% rename from tests/integration/native-image/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-3/native-image.properties rename to tests/integration/packaging/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp1/native-image.properties index 69b9f9e926b..ceb51af7ac5 100644 --- a/tests/integration/native-image/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-3/native-image.properties +++ b/tests/integration/packaging/mp-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp1/native-image.properties @@ -14,4 +14,4 @@ # limitations under the License. # -Args=--initialize-at-build-time=io.helidon.tests.integration.nativeimage.mp3 +Args=--initialize-at-build-time=io.helidon.tests.integration.packaging.mp1 diff --git a/tests/integration/native-image/mp-1/src/main/resources/logging.properties b/tests/integration/packaging/mp-1/src/main/resources/logging.properties similarity index 95% rename from tests/integration/native-image/mp-1/src/main/resources/logging.properties rename to tests/integration/packaging/mp-1/src/main/resources/logging.properties index 9c31df101c2..f3dd9333243 100644 --- a/tests/integration/native-image/mp-1/src/main/resources/logging.properties +++ b/tests/integration/packaging/mp-1/src/main/resources/logging.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2023 Oracle and/or its affiliates. +# Copyright (c) 2018, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/native-image/mp-1/src/main/resources/mp-meta-config.yaml b/tests/integration/packaging/mp-1/src/main/resources/mp-meta-config.yaml similarity index 91% rename from tests/integration/native-image/mp-1/src/main/resources/mp-meta-config.yaml rename to tests/integration/packaging/mp-1/src/main/resources/mp-meta-config.yaml index 7eddde48ee4..1af0a531cc7 100644 --- a/tests/integration/native-image/mp-1/src/main/resources/mp-meta-config.yaml +++ b/tests/integration/packaging/mp-1/src/main/resources/mp-meta-config.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2021 Oracle and/or its affiliates. +# Copyright (c) 2020, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,10 +20,10 @@ sources: - type: "system-properties" - type: "environment-variables" - type: "yaml" + optional: true path: "mp-config.yaml" - type: "yaml" optional: true classpath: "application.yaml" - type: "properties" classpath: "META-INF/microprofile-config.properties" - diff --git a/tests/integration/native-image/mp-1/src/main/resources/sign-jwk.json b/tests/integration/packaging/mp-1/src/main/resources/sign-jwk.json similarity index 100% rename from tests/integration/native-image/mp-1/src/main/resources/sign-jwk.json rename to tests/integration/packaging/mp-1/src/main/resources/sign-jwk.json diff --git a/tests/integration/native-image/mp-1/src/main/resources/verify-jwk.json b/tests/integration/packaging/mp-1/src/main/resources/verify-jwk.json similarity index 100% rename from tests/integration/native-image/mp-1/src/main/resources/verify-jwk.json rename to tests/integration/packaging/mp-1/src/main/resources/verify-jwk.json diff --git a/tests/integration/native-image/mp-1/src/main/resources/web/resource.txt b/tests/integration/packaging/mp-1/src/main/resources/web/resource.txt similarity index 100% rename from tests/integration/native-image/mp-1/src/main/resources/web/resource.txt rename to tests/integration/packaging/mp-1/src/main/resources/web/resource.txt diff --git a/tests/integration/native-image/mp-1/src/main/resources/web/welcome.txt b/tests/integration/packaging/mp-1/src/main/resources/web/welcome.txt similarity index 100% rename from tests/integration/native-image/mp-1/src/main/resources/web/welcome.txt rename to tests/integration/packaging/mp-1/src/main/resources/web/welcome.txt diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarClassPathTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarClassPathTestIT.java new file mode 100644 index 00000000000..e6a8cabc2bc --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarClassPathTestIT.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp1JarClassPathTestIT extends Mp1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.CLASS_PATH; + } + + @Test + void testApp() { + doTestApp(); + } +} diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarModulePathTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarModulePathTestIT.java new file mode 100644 index 00000000000..6219c46c711 --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JarModulePathTestIT.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp1JarModulePathTestIT extends Mp1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.MODULE_PATH; + } + + @Test + void testApp() { + doTestApp(); + } +} diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkModulePathTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkModulePathTestIT.java new file mode 100644 index 00000000000..0763be2cc31 --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkModulePathTestIT.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp1JlinkModulePathTestIT extends Mp1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.JLINK_MODULE_PATH; + } + + @Test + void testApp() { + doTestApp(); + } +} diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkTestIT.java new file mode 100644 index 00000000000..4990051f946 --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1JlinkTestIT.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp1JlinkTestIT extends Mp1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.JLINK_CLASS_PATH; + } + + @Test + void testApp() { + doTestApp(); + } +} diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1NativeTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1NativeTestIT.java new file mode 100644 index 00000000000..9edd7bf03e2 --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1NativeTestIT.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp1NativeTestIT extends Mp1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.NATIVE; + } + + @Test + void testApp() { + doTestApp(); + } +} diff --git a/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1PackagingTestIT.java b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1PackagingTestIT.java new file mode 100644 index 00000000000..d9c781e7108 --- /dev/null +++ b/tests/integration/packaging/mp-1/src/test/java/io/helidon/tests/integration/packaging/mp1/Mp1PackagingTestIT.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp1; + +import io.helidon.tests.integration.harness.ProcessRunner; +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; +import io.helidon.tests.integration.harness.ProcessMonitor; +import io.helidon.tests.integration.harness.WaitStrategy; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +abstract class Mp1PackagingTestIT { + + abstract ExecMode execMode(); + + void doTestApp() { + try (ProcessMonitor process = process() + .await(WaitStrategy.waitForCompletion())) { + assertThat(process.get().exitValue(), is(0)); + } + } + + private ProcessMonitor process(String... opts) { + return ProcessRunner.of(execMode()) + .finalName("helidon-tests-integration-packaging-mp-1") + .moduleName("io.helidon.tests.integration.packaging.mp.one") + .mainClass("io.helidon.tests.integration.packaging.mp1.Mp1Main") + .opts(opts) + .start(); + } +} diff --git a/tests/integration/native-image/mp-1/web/resource.txt b/tests/integration/packaging/mp-1/web/resource.txt similarity index 100% rename from tests/integration/native-image/mp-1/web/resource.txt rename to tests/integration/packaging/mp-1/web/resource.txt diff --git a/tests/integration/packaging/mp-2/README.md b/tests/integration/packaging/mp-2/README.md new file mode 100644 index 00000000000..c1bb15061fc --- /dev/null +++ b/tests/integration/packaging/mp-2/README.md @@ -0,0 +1,31 @@ +# Packaging Integration Test MP2 + +This test makes sure the following helidon modules can be compiled into native image: +- JPA in MicroProfile app +- JTA in MicroProfile app + +--- + +To run this test: +```shell +mvn clean verify +mvn clean verify -Pnative-image +mvn clean verify -Pjlink-image +``` + +--- + +Start the database manually: +```shell +docker run -d \ + -name oracledb \ + -e ORACLE_PWD=oracle123 \ + -v ./src/test/resources/init.sql:/opt/oracle/scripts/startup/init.sql \ + -p 1521:1521 \ + container-registry.oracle.com/database/express:latest +``` + +Start the application: +```shell +java -jar target/helidon-tests-integration-packaging-mp-2.jar +``` diff --git a/tests/integration/native-image/mp-2/pom.xml b/tests/integration/packaging/mp-2/pom.xml similarity index 54% rename from tests/integration/native-image/mp-2/pom.xml rename to tests/integration/packaging/mp-2/pom.xml index 6b9b417cbf3..d26f8644a8f 100644 --- a/tests/integration/native-image/mp-2/pom.xml +++ b/tests/integration/packaging/mp-2/pom.xml @@ -25,17 +25,13 @@ 4.1.0-SNAPSHOT ../../../../applications/mp/pom.xml - io.helidon.tests.integration.native-image - helidon-tests-native-image-mp-2 - Helidon Tests Integration GraalVM Native image MP2 - - - This test makes sure the following helidon modules can be compiled into native image: - JPA in MicroProfile app - JTA in - MicroProfile app - + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging-mp-2 + Helidon Tests Integration Packaging MP2 - io.helidon.tests.integration.nativeimage.mp2.Mp2Main + io.helidon.tests.integration.packaging.mp2.Mp2Main + true @@ -55,9 +51,6 @@ io.smallrye jandex - jakarta.persistence jakarta.persistence-api @@ -109,12 +102,28 @@ org.slf4j slf4j-jdk14 - org.junit.jupiter junit-jupiter-api test + + org.hamcrest + hamcrest-all + test + + + io.helidon.tests.integration + helidon-tests-integration-harness + ${project.version} + test + + + + org.testcontainers + junit-jupiter + test + @@ -161,6 +170,102 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IT + + + + ${project.build.outputDirectory}/logging.properties + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + ${project.build.outputDirectory}/logging.properties + + + ${redirectTestOutputToFile} + + + + + integration-test + verify + + + + + + + + jar-image + + true + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jar*IT + + + + + + + + native-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Native*IT + + + + + + + + jlink-image + + + + io.helidon.build-tools + helidon-maven-plugin + + false + false + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jlink*IT + + + + + + + diff --git a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/GreetingEntity.java b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/GreetingEntity.java similarity index 86% rename from tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/GreetingEntity.java rename to tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/GreetingEntity.java index c5a1974b711..d94c87353ba 100644 --- a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/GreetingEntity.java +++ b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/GreetingEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp2; +package io.helidon.tests.integration.packaging.mp2; import java.util.Objects; @@ -36,7 +36,7 @@ public class GreetingEntity { private String secondPart; /** - * Creates a new {@link io.helidon.tests.integration.nativeimage.mp2.GreetingEntity}; required by the JPA + * Creates a new {@link GreetingEntity}; required by the JPA * specification and for no other purpose. * * @deprecated Please use the {@link #GreetingEntity(String, String)} constructor instead. @@ -49,7 +49,7 @@ protected GreetingEntity() { } /** - * Creates a new {@link io.helidon.tests.integration.nativeimage.mp2.GreetingEntity}. + * Creates a new {@link GreetingEntity}. * * @param firstPart the first part of the greeting; must not be * {@code null} @@ -97,12 +97,12 @@ public void setSecondPart(final String secondPart) { /** * Returns a {@link String} representation of the second part of - * this {@link io.helidon.tests.integration.nativeimage.mp2.GreetingEntity}. + * this {@link GreetingEntity}. * *

This method never returns {@code null}.

* * @return a non-{@code null} {@link String} representation of the - * second part of this {@link io.helidon.tests.integration.nativeimage.mp2.GreetingEntity} + * second part of this {@link GreetingEntity} */ @Override public String toString() { diff --git a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/JaxRsResource.java b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/JaxRsResource.java similarity index 96% rename from tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/JaxRsResource.java rename to tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/JaxRsResource.java index 6abb6de0ea7..4bf9beb4dd5 100644 --- a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/JaxRsResource.java +++ b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/JaxRsResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp2; +package io.helidon.tests.integration.packaging.mp2; import java.net.URI; diff --git a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/Mp2Main.java b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/Mp2Main.java similarity index 96% rename from tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/Mp2Main.java rename to tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/Mp2Main.java index f7a4f1fab32..3d18278de7b 100644 --- a/tests/integration/native-image/mp-2/src/main/java/io/helidon/tests/integration/nativeimage/mp2/Mp2Main.java +++ b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/Mp2Main.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp2; +package io.helidon.tests.integration.packaging.mp2; import io.helidon.common.Errors; import io.helidon.microprofile.server.Server; @@ -38,6 +38,7 @@ private Mp2Main() { /** * Application main entry point. + * * @param args command line arguments. */ public static void main(final String[] args) { @@ -109,7 +110,7 @@ private static void validateResponse(Response response, Errors.Collector collect } } else { collector.fatal("Endpoint " + path + " should be accessible. Status received: " - + response.getStatus()); + + response.getStatus()); } } } diff --git a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/package-info.java b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/package-info.java similarity index 76% rename from tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/package-info.java rename to tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/package-info.java index fb60757f945..2b81e097ea0 100644 --- a/tests/integration/native-image/mp-1/src/main/java/io/helidon/tests/integration/nativeimage/mp1/package-info.java +++ b/tests/integration/packaging/mp-2/src/main/java/io/helidon/tests/integration/packaging/mp2/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ * limitations under the License. */ /** - * Application to test GraalVM native-image with Helidon MP. + * Helidon Tests Integration Packaging MP2. */ -package io.helidon.tests.integration.nativeimage.mp1; +package io.helidon.tests.integration.packaging.mp2; diff --git a/tests/integration/native-image/mp-2/src/main/resources/META-INF/beans.xml b/tests/integration/packaging/mp-2/src/main/resources/META-INF/beans.xml similarity index 100% rename from tests/integration/native-image/mp-2/src/main/resources/META-INF/beans.xml rename to tests/integration/packaging/mp-2/src/main/resources/META-INF/beans.xml diff --git a/tests/integration/native-image/mp-2/src/main/resources/META-INF/microprofile-config.properties b/tests/integration/packaging/mp-2/src/main/resources/META-INF/microprofile-config.properties similarity index 68% rename from tests/integration/native-image/mp-2/src/main/resources/META-INF/microprofile-config.properties rename to tests/integration/packaging/mp-2/src/main/resources/META-INF/microprofile-config.properties index 515525f15e9..211f5a84b5f 100644 --- a/tests/integration/native-image/mp-2/src/main/resources/META-INF/microprofile-config.properties +++ b/tests/integration/packaging/mp-2/src/main/resources/META-INF/microprofile-config.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2021 Oracle and/or its affiliates. +# Copyright (c) 2019, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,11 +15,7 @@ # server.port=8087 features.print-details=true -#javax.sql.DataSource.test.dataSource.url=jdbc:h2:tcp://localhost:9092/test -#javax.sql.DataSource.test.dataSource.user=sa -#javax.sql.DataSource.test.dataSource.password=${EMPTY} -#javax.sql.DataSource.test.dataSourceClassName=org.h2.jdbcx.JdbcDataSource javax.sql.DataSource.test.dataSource.url=jdbc:oracle:thin:@localhost:1521/XE javax.sql.DataSource.test.dataSource.user=system -javax.sql.DataSource.test.dataSource.password=oracle +javax.sql.DataSource.test.dataSource.password=oracle123 javax.sql.DataSource.test.dataSourceClassName=oracle.jdbc.pool.OracleDataSource diff --git a/tests/integration/native-image/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-2/native-image.properties b/tests/integration/packaging/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp2/native-image.properties similarity index 88% rename from tests/integration/native-image/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-2/native-image.properties rename to tests/integration/packaging/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp2/native-image.properties index 019b20a2a29..97410fa5a9b 100644 --- a/tests/integration/native-image/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-mp-2/native-image.properties +++ b/tests/integration/packaging/mp-2/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp2/native-image.properties @@ -14,4 +14,4 @@ # limitations under the License. # -Args=--initialize-at-build-time=io.helidon.tests.integration.nativeimage.mp2 +Args=--initialize-at-build-time=io.helidon.tests.integration.packaging.mp2 diff --git a/tests/integration/native-image/mp-2/src/main/resources/META-INF/persistence.xml b/tests/integration/packaging/mp-2/src/main/resources/META-INF/persistence.xml similarity index 87% rename from tests/integration/native-image/mp-2/src/main/resources/META-INF/persistence.xml rename to tests/integration/packaging/mp-2/src/main/resources/META-INF/persistence.xml index a9a8c016a8b..1c4ca91b456 100644 --- a/tests/integration/native-image/mp-2/src/main/resources/META-INF/persistence.xml +++ b/tests/integration/packaging/mp-2/src/main/resources/META-INF/persistence.xml @@ -1,7 +1,7 @@ - + + + 4.0.0 + + io.helidon.applications + helidon-mp + 4.1.0-SNAPSHOT + ../../../../applications/mp/pom.xml + + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging-mp-3 + Helidon Tests Integration Packaging MP3 + + + This test uses quickstart application with minimal number of changes + + + + io.helidon.tests.integration.packaging.mp3.Mp3Main + true + + + + + io.helidon.microprofile.bundles + helidon-microprofile + + + io.helidon.inject + helidon-inject-runtime + true + + + io.smallrye + jandex + runtime + true + + + io.helidon.logging + helidon-logging-jul + + + org.junit.jupiter + junit-jupiter-api + test + + + org.hamcrest + hamcrest-all + test + + + io.helidon.tests.integration + helidon-tests-integration-harness + ${project.version} + test + + + + + + + org.graalvm.buildtools + native-maven-plugin + + true + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-libs + + + + + io.smallrye + jandex-maven-plugin + + + make-index + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IT + + + + ${project.build.outputDirectory}/logging.properties + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + ${project.build.outputDirectory}/logging.properties + + + ${redirectTestOutputToFile} + + + + + integration-test + verify + + + + + + + + + + jar-image + + true + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jar*IT + + + + + + + + native-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Native*IT + + + + + + + + jlink-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jlink*IT + + + + + + + + diff --git a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetResource.java b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetResource.java similarity index 97% rename from tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetResource.java rename to tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetResource.java index 4c06382723e..91ea9277211 100644 --- a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetResource.java +++ b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp3; +package io.helidon.tests.integration.packaging.mp3; import java.util.Collections; diff --git a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetingProvider.java b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetingProvider.java similarity index 92% rename from tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetingProvider.java rename to tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetingProvider.java index 47e309b4eac..23bfceae9b7 100644 --- a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/GreetingProvider.java +++ b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/GreetingProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021 Oracle and/or its affiliates. + * Copyright (c) 2018, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp3; +package io.helidon.tests.integration.packaging.mp3; import java.util.concurrent.atomic.AtomicReference; diff --git a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/Mp3Main.java b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/Mp3Main.java similarity index 89% rename from tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/Mp3Main.java rename to tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/Mp3Main.java index 83d5da9e999..4c7be7a0751 100644 --- a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/Mp3Main.java +++ b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/Mp3Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Oracle and/or its affiliates. + * Copyright (c) 2023, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,8 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -package io.helidon.tests.integration.nativeimage.mp3; +package io.helidon.tests.integration.packaging.mp3; import io.helidon.Main; diff --git a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/RoutingService.java b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/RoutingService.java similarity index 92% rename from tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/RoutingService.java rename to tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/RoutingService.java index 1aaaf910b79..c703fdcf726 100644 --- a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/RoutingService.java +++ b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/RoutingService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.mp3; +package io.helidon.tests.integration.packaging.mp3; import io.helidon.microprofile.server.RoutingPath; import io.helidon.webserver.http.HttpRules; diff --git a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/package-info.java b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/package-info.java similarity index 84% rename from tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/package-info.java rename to tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/package-info.java index d67a4e663c5..c5ad9264e63 100644 --- a/tests/integration/native-image/mp-3/src/main/java/io/helidon/tests/integration/nativeimage/mp3/package-info.java +++ b/tests/integration/packaging/mp-3/src/main/java/io/helidon/tests/integration/packaging/mp3/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021 Oracle and/or its affiliates. + * Copyright (c) 2018, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ /** * Quickstart MicroProfile example. */ -package io.helidon.tests.integration.nativeimage.mp3; +package io.helidon.tests.integration.packaging.mp3; diff --git a/tests/integration/native-image/mp-3/src/main/java/module-info.java b/tests/integration/packaging/mp-3/src/main/java/module-info.java similarity index 68% rename from tests/integration/native-image/mp-3/src/main/java/module-info.java rename to tests/integration/packaging/mp-3/src/main/java/module-info.java index 4093f443cdb..8ed300e2f52 100644 --- a/tests/integration/native-image/mp-3/src/main/java/module-info.java +++ b/tests/integration/packaging/mp-3/src/main/java/module-info.java @@ -15,14 +15,14 @@ */ /** - * Quickstart MicroProfile example. + * Helidon Tests Integration Packaging MP3. */ -module helidon.tests.nimage.quickstartmp { +module io.helidon.tests.integration.packaging.mp.three { + requires java.logging; requires io.helidon.microprofile.bundle; - exports io.helidon.tests.integration.nativeimage.mp3; + exports io.helidon.tests.integration.packaging.mp3; - opens io.helidon.tests.integration.nativeimage.mp3 to weld.core.impl, org.glassfish.hk2.utilities, io.helidon.microprofile.cdi; - + opens io.helidon.tests.integration.packaging.mp3 to weld.core.impl, org.glassfish.hk2.utilities, io.helidon.microprofile.cdi; } diff --git a/tests/integration/native-image/mp-3/src/main/resources/META-INF/beans.xml b/tests/integration/packaging/mp-3/src/main/resources/META-INF/beans.xml similarity index 100% rename from tests/integration/native-image/mp-3/src/main/resources/META-INF/beans.xml rename to tests/integration/packaging/mp-3/src/main/resources/META-INF/beans.xml diff --git a/tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config-test.properties b/tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config-test.properties similarity index 90% rename from tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config-test.properties rename to tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config-test.properties index b242148a897..aa892f4178f 100644 --- a/tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config-test.properties +++ b/tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config-test.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Oracle and/or its affiliates. +# Copyright (c) 2021, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config.properties b/tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config.properties similarity index 92% rename from tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config.properties rename to tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config.properties index 496292ab203..9a1514cc474 100644 --- a/tests/integration/native-image/mp-3/src/main/resources/META-INF/microprofile-config.properties +++ b/tests/integration/packaging/mp-3/src/main/resources/META-INF/microprofile-config.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023 Oracle and/or its affiliates. +# Copyright (c) 2020, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/packaging/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp-3/native-image.properties b/tests/integration/packaging/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp-3/native-image.properties new file mode 100644 index 00000000000..af277f9d118 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-mp-3/native-image.properties @@ -0,0 +1,17 @@ +# +# Copyright (c) 2023, 2024 Oracle and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +Args=--initialize-at-build-time=io.helidon.tests.integration.packaging.mp3 diff --git a/tests/integration/native-image/mp-3/src/main/resources/logging.properties b/tests/integration/packaging/mp-3/src/main/resources/logging.properties similarity index 100% rename from tests/integration/native-image/mp-3/src/main/resources/logging.properties rename to tests/integration/packaging/mp-3/src/main/resources/logging.properties diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarClassPathTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarClassPathTestIT.java new file mode 100644 index 00000000000..ee9ea832442 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarClassPathTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp3JarClassPathTestIT extends Mp3PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.CLASS_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testGreetResource() { + doTestGreetResource(); + } +} diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarModulePathTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarModulePathTestIT.java new file mode 100644 index 00000000000..de202f2af13 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JarModulePathTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp3JarModulePathTestIT extends Mp3PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.MODULE_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testGreetResource() { + doTestGreetResource(); + } +} diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkModulePathTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkModulePathTestIT.java new file mode 100644 index 00000000000..f4c531aadb9 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkModulePathTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp3JlinkModulePathTestIT extends Mp3PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.JLINK_MODULE_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testGreetResource() { + doTestGreetResource(); + } +} diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkTestIT.java new file mode 100644 index 00000000000..035d5a1a533 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3JlinkTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp3JlinkTestIT extends Mp3PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.JLINK_CLASS_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testGreetResource() { + doTestGreetResource(); + } +} diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3NativeTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3NativeTestIT.java new file mode 100644 index 00000000000..50cf1bf1063 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3NativeTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Mp3NativeTestIT extends Mp3PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.NATIVE; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testGreetResource() { + doTestGreetResource(); + } +} diff --git a/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3PackagingTestIT.java b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3PackagingTestIT.java new file mode 100644 index 00000000000..39aa02e66a2 --- /dev/null +++ b/tests/integration/packaging/mp-3/src/test/java/io/helidon/tests/integration/packaging/mp3/Mp3PackagingTestIT.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.mp3; + +import java.util.Map; + +import io.helidon.http.Status; +import io.helidon.tests.integration.harness.ProcessRunner; +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; +import io.helidon.tests.integration.harness.ProcessMonitor; +import io.helidon.tests.integration.harness.WaitStrategy; +import io.helidon.webclient.api.ClientResponseTyped; +import io.helidon.webclient.api.WebClient; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +abstract class Mp3PackagingTestIT { + + abstract ExecMode execMode(); + + void doTestExitOnStarted() { + try (ProcessMonitor process = process(Map.of("exit.on.started", "!")) + .await(WaitStrategy.waitForCompletion())) { + + assertThat(process.get().exitValue(), is(0)); + } + } + + void doTestGreetResource() { + try (ProcessMonitor process = process(Map.of()) + .await(WaitStrategy.waitForPort())) { + + WebClient client = WebClient.builder() + .baseUri("http://localhost:" + process.port()) + .build(); + ClientResponseTyped response = client.get("/greet/Joe").request(String.class); + assertThat(response.status(), is(Status.OK_200)); + assertThat(response.entity(), is("{\"message\":\"Hello Joe!\"}")); + } + } + + private ProcessMonitor process(Map properties) { + return ProcessRunner.of(execMode()) + .finalName("helidon-tests-integration-packaging-mp-3") + .moduleName("io.helidon.tests.integration.packaging.mp.three") + .mainClass("io.helidon.tests.integration.packaging.mp3.Mp3Main") + .properties(properties) + .start(); + } +} diff --git a/tests/integration/native-image/pom.xml b/tests/integration/packaging/pom.xml similarity index 84% rename from tests/integration/native-image/pom.xml rename to tests/integration/packaging/pom.xml index b9554569dbd..03cf9f36325 100644 --- a/tests/integration/native-image/pom.xml +++ b/tests/integration/packaging/pom.xml @@ -27,11 +27,12 @@ ../pom.xml pom - helidon-tests-integration-native-image - Helidon Tests Integration GraalVM Native image + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging + Helidon Tests Integration Packaging - A set of tests that make sure various Helidon modules can compile with native-image. + A set of tests that verify the Helidon packaging variants (native-image, jlink, jar). @@ -41,5 +42,4 @@ mp-3 se-1 - diff --git a/tests/integration/packaging/se-1/README.md b/tests/integration/packaging/se-1/README.md new file mode 100644 index 00000000000..cfe2e12e72b --- /dev/null +++ b/tests/integration/packaging/se-1/README.md @@ -0,0 +1,8 @@ +# Packaging Integration Test SE1 + +To run this test: +```shell +mvn clean verify +mvn clean verify -Pnative-image +mvn clean verify -Pjlink-image +``` diff --git a/tests/integration/native-image/se-1/conf/overrides.yaml b/tests/integration/packaging/se-1/conf/overrides.yaml similarity index 91% rename from tests/integration/native-image/se-1/conf/overrides.yaml rename to tests/integration/packaging/se-1/conf/overrides.yaml index 9028de61d52..ea4f1ab111e 100644 --- a/tests/integration/native-image/se-1/conf/overrides.yaml +++ b/tests/integration/packaging/se-1/conf/overrides.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2023 Oracle and/or its affiliates. +# Copyright (c) 2022, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/integration/packaging/se-1/pom.xml b/tests/integration/packaging/se-1/pom.xml new file mode 100644 index 00000000000..9e942340afd --- /dev/null +++ b/tests/integration/packaging/se-1/pom.xml @@ -0,0 +1,234 @@ + + + + + 4.0.0 + + io.helidon.applications + helidon-se + 4.1.0-SNAPSHOT + ../../../../applications/se/pom.xml + + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging-se-1 + Helidon Tests Integration Packaging SE1 + + + io.helidon.tests.integration.packaging.se1.Se1Main + true + + + + + io.helidon.webserver + helidon-webserver + + + io.helidon.webserver + helidon-webserver-static-content + + + io.helidon.webserver + helidon-webserver-websocket + + + io.helidon.http.media + helidon-http-media-jsonp + + + io.helidon.http.media + helidon-http-media-jsonb + + + io.helidon.config + helidon-config-yaml + + + io.helidon.tracing + helidon-tracing + + + io.helidon.tracing.providers + helidon-tracing-providers-zipkin + + + io.helidon.http.encoding + helidon-http-encoding-gzip + + + io.helidon.webserver.observe + helidon-webserver-observe-health + + + io.helidon.webserver.observe + helidon-webserver-observe-tracing + + + io.helidon.webclient + helidon-webclient + + + helidon-webclient-tracing + io.helidon.webclient + + + io.helidon.common + helidon-common-reactive + + + io.helidon.logging + helidon-logging-common + + + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging-static-content + ${project.version} + + + io.helidon.logging + helidon-logging-jul + runtime + + + org.junit.jupiter + junit-jupiter-api + test + + + org.hamcrest + hamcrest-all + test + + + io.helidon.tests.integration + helidon-tests-integration-harness + ${project.version} + test + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-libs + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IT + + + + ${project.build.outputDirectory}/logging.properties + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + ${project.build.outputDirectory}/logging.properties + + + ${redirectTestOutputToFile} + + + + + integration-test + verify + + + + + + + + + + jar-image + + true + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jar*IT + + + + + + + + native-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Native*IT + + + + + + + + jlink-image + + + + io.helidon.build-tools + helidon-maven-plugin + + -Dapp.static.path=../../web + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*Jlink*IT + + + + + + + + diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Animal.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Animal.java similarity index 91% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Animal.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Animal.java index b44b8aefa7e..cf6731596db 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Animal.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Animal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. + * Copyright (c) 2022, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; import io.helidon.common.Reflected; diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/GreetService.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/GreetService.java similarity index 85% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/GreetService.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/GreetService.java index 043128e7fbf..029b833fcf3 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/GreetService.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/GreetService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. + * Copyright (c) 2022, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,10 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; import java.util.Collections; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; import io.helidon.config.Config; import io.helidon.http.Status; @@ -32,20 +31,8 @@ import jakarta.json.JsonObject; /** - * A simple service to greet you. Examples: - * - * Get default greeting message: - * curl -X GET http://localhost:8080/greet - * - * Get greeting message for Joe: - * curl -X GET http://localhost:8080/greet/Joe - * - * Change greeting - * curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Howdy"}' http://localhost:8080/greet/greeting - * - * The message is returned as a JSON object + * A simple service to greet you. */ - class GreetService implements HttpService { private static final JsonBuilderFactory JSON = Json.createBuilderFactory(Collections.emptyMap()); @@ -60,7 +47,7 @@ class GreetService implements HttpService { // initial value greeting.set(greetingConfig.asString().orElse("Ciao")); - greetingConfig.onChange((Consumer) cfg -> greeting.set(cfg.asString().orElse("Ciao"))); + greetingConfig.onChange(cfg -> greeting.set(cfg.asString().orElse("Ciao"))); } @Override diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/MockZipkinService.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/MockZipkinService.java similarity index 51% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/MockZipkinService.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/MockZipkinService.java index 192a929f5ae..81766c9210d 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/MockZipkinService.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/MockZipkinService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,13 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; import java.lang.System.Logger.Level; +import java.util.List; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicReference; -import java.util.zip.GZIPInputStream; import io.helidon.common.reactive.Single; import io.helidon.webserver.http.HttpRules; @@ -28,28 +28,24 @@ import io.helidon.webserver.http.ServerRequest; import io.helidon.webserver.http.ServerResponse; -import jakarta.json.Json; -import jakarta.json.JsonPointer; -import jakarta.json.JsonString; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; import jakarta.json.JsonValue; class MockZipkinService implements HttpService { private static final System.Logger LOGGER = System.getLogger(MockZipkinService.class.getName()); - final static JsonPointer TAGS_POINTER = Json.createPointer("/tags"); - final static JsonPointer COMPONENT_POINTER = Json.createPointer("/tags/component"); - - private final Set filteredComponents; + private final Set components; private final AtomicReference> next = new AtomicReference<>(new CompletableFuture<>()); /** * Create mock of the Zipkin listening on /api/v2/spans. * - * @param filteredComponents listen only for traces with component tag having one of specified values + * @param components listen only for traces with component tag having one of specified values */ - MockZipkinService(Set filteredComponents) { - this.filteredComponents = filteredComponents; + MockZipkinService(Set components) { + this.components = components; } @Override @@ -67,26 +63,18 @@ Single next() { } private void mockZipkin(ServerRequest request, ServerResponse response) { - try { - request.query().all("serviceName").forEach(s -> System.out.println(">>>" + s)); - - GZIPInputStream is = new GZIPInputStream(request.content() - .inputStream()); - Json.createReader(is).readArray() - .stream() - .map(JsonValue::asJsonObject) - .filter(json -> - TAGS_POINTER.containsValue(json) - && COMPONENT_POINTER.containsValue(json) - && filteredComponents.stream() - .anyMatch(s -> s.equals(((JsonString) COMPONENT_POINTER.getValue(json)).getString())) - ) - .peek(json -> LOGGER.log(Level.INFO, json.toString())) - .forEach(e -> next.getAndSet(new CompletableFuture<>()).complete(e)); + JsonArray entity = request.content().as(JsonArray.class); + List spans = entity.stream() + .map(JsonValue::asJsonObject) + .filter(o -> o.containsKey("tags")) + .filter(o -> components.contains(o.getJsonObject("tags").getString("component"))) + .toList(); - response.send(); - } catch (Exception e) { - response.send(e); + for (JsonObject span : spans) { + LOGGER.log(Level.INFO, span.toString()); + next.getAndSet(new CompletableFuture<>()).complete(span); } + + response.send(); } } diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Se1Main.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Se1Main.java similarity index 81% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Se1Main.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Se1Main.java index f964d708963..3346e74b595 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/Se1Main.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/Se1Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,15 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; +import java.nio.file.Path; import java.nio.file.Paths; +import java.util.List; import java.util.Set; import io.helidon.config.Config; +import io.helidon.config.ConfigSources; import io.helidon.config.FileSystemWatcher; import io.helidon.health.HealthCheckResponse; import io.helidon.logging.common.LogConfig; @@ -61,19 +64,24 @@ static WebServer startServer() { // load logging configuration LogConfig.configureRuntime(); - // By default this will pick up application.yaml from the classpath + // By default, this will pick up application.yaml from the classpath Config config = buildConfig(); + HealthObserver health = HealthObserver.builder() .addCheck(() -> HealthCheckResponse.builder() .detail("timestamp", System.currentTimeMillis()) .build()) .build(); - ObserveFeature observe = ObserveFeature.just(health); + + ObserveFeature observe = ObserveFeature.builder() + .config(config) + .addObserver(health) + .build(); // Get webserver config from the "server" section of application.yaml WebServer server = WebServer.builder() - .port(7076) + .config(config.get("server")) .addFeature(observe) .addRouting(createRouting(config)) .addRouting(WsRouting.builder() @@ -88,12 +96,14 @@ static WebServer startServer() { private static Config buildConfig() { return Config.builder() - .sources( + .sources(List.of( + ConfigSources.systemProperties(), + ConfigSources.environmentVariables(), classpath("application-test.yaml").optional(), file("conf/overrides.yaml") .changeWatcher(FileSystemWatcher.create()) .optional(), - classpath("application.yaml")) + classpath("application.yaml"))) .build(); } @@ -109,8 +119,12 @@ private static HttpRouting.Builder createRouting(Config config) { MockZipkinService zipkinService = new MockZipkinService(Set.of("helidon-webclient")); WebClientService webClientService = new WebClientService(config, zipkinService); + Path web = config.get("app.static.path") + .as(Path.class) + .orElseThrow(() -> new IllegalStateException("app static path is not present")); + return HttpRouting.builder() - .register("/static/path", StaticContentService.create(Paths.get("web"))) + .register("/static/path", StaticContentService.create(web)) .register("/static/classpath", StaticContentService.create("web")) .register("/static/jar", StaticContentService.create("web-jar")) .register("/greet", greetService) diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebClientService.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebClientService.java similarity index 94% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebClientService.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebClientService.java index 06b2484c00e..fc235b61d40 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebClientService.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebClientService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; import java.io.PrintWriter; import java.io.StringWriter; @@ -44,9 +44,9 @@ class WebClientService implements HttpService { private final MockZipkinService zipkinService; private final String context; - public WebClientService(Config config, MockZipkinService zipkinService) { + WebClientService(Config config, MockZipkinService zipkinService) { this.zipkinService = zipkinService; - this.context = "http://localhost:" + config.get("port").asInt().orElse(7076); + this.context = "http://localhost:" + config.get("server.port").asInt().orElse(7076); client = WebClient.builder() .baseUri(context) .addHeader(HeaderNames.ACCEPT, MediaTypes.APPLICATION_JSON.text()) diff --git a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebSocketEndpoint.java b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebSocketEndpoint.java similarity index 92% rename from tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebSocketEndpoint.java rename to tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebSocketEndpoint.java index 24af59bddd0..9e06c8e896a 100644 --- a/tests/integration/native-image/se-1/src/main/java/io/helidon/tests/integration/nativeimage/se1/WebSocketEndpoint.java +++ b/tests/integration/packaging/se-1/src/main/java/io/helidon/tests/integration/packaging/se1/WebSocketEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023 Oracle and/or its affiliates. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.se1; +package io.helidon.tests.integration.packaging.se1; import java.lang.System.Logger.Level; diff --git a/tests/integration/native-image/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-se-1/resource-config.json b/tests/integration/packaging/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-se-1/resource-config.json similarity index 100% rename from tests/integration/native-image/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.native-image/helidon-tests-native-image-se-1/resource-config.json rename to tests/integration/packaging/se-1/src/main/resources/META-INF/native-image/io.helidon.tests.integration.packaging/helidon-tests-integration-packaging-se-1/resource-config.json diff --git a/tests/integration/native-image/se-1/src/main/resources/application.yaml b/tests/integration/packaging/se-1/src/main/resources/application.yaml similarity index 89% rename from tests/integration/native-image/se-1/src/main/resources/application.yaml rename to tests/integration/packaging/se-1/src/main/resources/application.yaml index 7b360e1bd65..7e063a53a48 100644 --- a/tests/integration/native-image/se-1/src/main/resources/application.yaml +++ b/tests/integration/packaging/se-1/src/main/resources/application.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2023 Oracle and/or its affiliates. +# Copyright (c) 2018, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ tracing: service: "helidon-se" protocol: "http" host: "localhost" - port: 7076 + port: "${server.port}" api-version: 2 # mocked zipkin path: "/zipkin/api/v2/spans" @@ -34,4 +34,4 @@ client: follow-redirects: true max-redirects: 5 services: - tracing: \ No newline at end of file + tracing: diff --git a/tests/integration/native-image/se-1/src/main/resources/logging.properties b/tests/integration/packaging/se-1/src/main/resources/logging.properties similarity index 100% rename from tests/integration/native-image/se-1/src/main/resources/logging.properties rename to tests/integration/packaging/se-1/src/main/resources/logging.properties diff --git a/tests/integration/native-image/se-1/src/main/resources/web/resource.txt b/tests/integration/packaging/se-1/src/main/resources/web/resource.txt similarity index 100% rename from tests/integration/native-image/se-1/src/main/resources/web/resource.txt rename to tests/integration/packaging/se-1/src/main/resources/web/resource.txt diff --git a/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JarClassPathTestIT.java b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JarClassPathTestIT.java new file mode 100644 index 00000000000..7aab6b52d9b --- /dev/null +++ b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JarClassPathTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.se1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Se1JarClassPathTestIT extends Se1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.CLASS_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testWebClientService() { + doTestWebClientService(); + } +} diff --git a/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JlinkTestIT.java b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JlinkTestIT.java new file mode 100644 index 00000000000..f5fbd612518 --- /dev/null +++ b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1JlinkTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.se1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Se1JlinkTestIT extends Se1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.JLINK_CLASS_PATH; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testWebClientService() { + doTestWebClientService(); + } +} diff --git a/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1NativeTestIT.java b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1NativeTestIT.java new file mode 100644 index 00000000000..ef7473132b4 --- /dev/null +++ b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1NativeTestIT.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.se1; + +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; + +import org.junit.jupiter.api.Test; + +class Se1NativeTestIT extends Se1PackagingTestIT { + + @Override + ExecMode execMode() { + return ExecMode.NATIVE; + } + + @Test + void testExitOnStarted() { + doTestExitOnStarted(); + } + + @Test + void testWebClientService() { + doTestWebClientService(); + } +} diff --git a/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1PackagingTestIT.java b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1PackagingTestIT.java new file mode 100644 index 00000000000..1379fd0368e --- /dev/null +++ b/tests/integration/packaging/se-1/src/test/java/io/helidon/tests/integration/packaging/se1/Se1PackagingTestIT.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.helidon.tests.integration.packaging.se1; + +import java.nio.file.Path; +import java.util.Map; + +import io.helidon.http.Status; +import io.helidon.tests.integration.harness.ProcessRunner; +import io.helidon.tests.integration.harness.ProcessRunner.ExecMode; +import io.helidon.tests.integration.harness.ProcessMonitor; +import io.helidon.tests.integration.harness.WaitStrategy; +import io.helidon.webclient.api.ClientResponseTyped; +import io.helidon.webclient.api.WebClient; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +abstract class Se1PackagingTestIT { + + abstract ExecMode execMode(); + + void doTestExitOnStarted() { + try (ProcessMonitor process = process(Map.of("exit.on.started", "!")) + .await(WaitStrategy.waitForCompletion())) { + + assertThat(process.get().exitValue(), is(0)); + } + } + + void doTestWebClientService() { + try (ProcessMonitor process = process(Map.of()) + .await(WaitStrategy.waitForPort())) { + + WebClient client = WebClient.builder() + .baseUri("http://localhost:" + process.port()) + .build(); + ClientResponseTyped response = client.get("/wc/test").request(String.class); + assertThat(response.status(), is(Status.OK_200)); + assertThat(response.entity(), is("ALL TESTS PASSED!\n")); + } + } + + private ProcessMonitor process(Map properties) { + return ProcessRunner.of(execMode()) + .finalName("helidon-tests-integration-packaging-se-1") + .properties(properties) + .properties(Map.of("app.static.path", Path.of("web").toAbsolutePath())) + .port(0) + .start(); + } +} diff --git a/tests/integration/native-image/se-1/web/resource.txt b/tests/integration/packaging/se-1/web/resource.txt similarity index 100% rename from tests/integration/native-image/se-1/web/resource.txt rename to tests/integration/packaging/se-1/web/resource.txt diff --git a/tests/integration/native-image/static-content/pom.xml b/tests/integration/packaging/static-content/pom.xml similarity index 75% rename from tests/integration/native-image/static-content/pom.xml rename to tests/integration/packaging/static-content/pom.xml index eb56878b61a..41fc6343022 100644 --- a/tests/integration/native-image/static-content/pom.xml +++ b/tests/integration/packaging/static-content/pom.xml @@ -20,14 +20,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.helidon.applications - helidon-se + io.helidon.tests.integration.packaging + helidon-tests-integration-packaging 4.1.0-SNAPSHOT - ../../../../applications/se/pom.xml + ../pom.xml - io.helidon.tests.integration - helidon-tests-native-image-static-content - Helidon Tests Integration GraalVM Native image Static Content + helidon-tests-integration-packaging-static-content + Helidon Tests Integration Packaging Static Content Static content jar file to use in other tests (to make sure we access a jar file and not a path). diff --git a/tests/integration/native-image/static-content/src/main/java/io/helidon/tests/integration/nativeimage/staticcontent/Dummy.java b/tests/integration/packaging/static-content/src/main/java/io/helidon/tests/integration/packaging/staticcontent/Dummy.java similarity index 84% rename from tests/integration/native-image/static-content/src/main/java/io/helidon/tests/integration/nativeimage/staticcontent/Dummy.java rename to tests/integration/packaging/static-content/src/main/java/io/helidon/tests/integration/packaging/staticcontent/Dummy.java index 5162557aa57..810a5a9d14b 100644 --- a/tests/integration/native-image/static-content/src/main/java/io/helidon/tests/integration/nativeimage/staticcontent/Dummy.java +++ b/tests/integration/packaging/static-content/src/main/java/io/helidon/tests/integration/packaging/staticcontent/Dummy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tests.integration.nativeimage.staticcontent; +package io.helidon.tests.integration.packaging.staticcontent; /** * This class exists so our jar file is correctly created. diff --git a/tests/integration/native-image/static-content/src/main/resources/web-jar/resource.txt b/tests/integration/packaging/static-content/src/main/resources/web-jar/resource.txt similarity index 100% rename from tests/integration/native-image/static-content/src/main/resources/web-jar/resource.txt rename to tests/integration/packaging/static-content/src/main/resources/web-jar/resource.txt diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml index c2c8b772383..855fa6485d3 100644 --- a/tests/integration/pom.xml +++ b/tests/integration/pom.xml @@ -60,7 +60,6 @@ mp-graphql mp-security-client mp-ws-services - native-image oidc restclient restclient-connector @@ -88,4 +87,12 @@ + + + packaging + + packaging + + +