Skip to content

Commit

Permalink
[OPENJDK-3597] test for MAVEN_SETTINGS_XML
Browse files Browse the repository at this point in the history
This test checks a custom test application source to ensure that
a custom settings.xml, which defines a custom profile, has been
activated.

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Jan 24, 2025
1 parent 5f47967 commit 3836e66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/maven/s2i/tests/features/java_s2i.feature
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ Feature: Openshift OpenJDK S2I tests
| variable | value |
| MAVEN_ARGS | validate |

Scenario: Ensure no custom settings.xml fails for specific application (OPENJDK-3597)
Given failing s2i build https://github.com/jmtd/openjdk-test-applications.git from OPENJDK-3597 using OPENJDK-3597-enforce-profile-active
Then s2i build log should contain [ERROR] Profile "testCustomProfile" is not activated

Scenario: Ensure custom settings.xml copied in via MAVEN_SETTINGS_XML (OPENJDK-3597)
Given s2i build https://github.com/jmtd/openjdk-test-applications.git from OPENJDK-3597 with env using OPENJDK-3597-enforce-profile-active
| variable | value |
| MAVEN_ARGS | validate |
| MAVEN_SETTINGS_XML | /tmp/src/settings.xml |
Then s2i build log should contain Rule 0: org.apache.maven.enforcer.rules.RequireActiveProfile passed

Scenario: Ensure that run-env.sh placed in the JAVA_APP_DIR is sourced in the run script before launching java
Given s2i build https://github.com/rh-openjdk/openjdk-container-test-applications.git from quarkus-quickstarts/getting-started-3.0.1.Final-nos2i
| variable | value |
Expand Down

0 comments on commit 3836e66

Please sign in to comment.