Skip to content

Commit 78e3bcf

Browse files
committed
[OPENJDK-1549] test for cleaned Maven environment
Perform an S2I 'build' of a test Maven project. Define MAVEN_ARGS for two purposes: 1. so that it exists in the environment prior to invoking Mvn 2. In order to specify the phase 'validate' The preferred way to achieve (2) is by defining MAVEN_S2I_GOALS, but defining MAVEN_ARGS for (1) overrides that value. Please note the chicken-and-egg problem with defining this test. The test needs to clone the Maven project from a git repository. Until the PR introducing the test is merged, it does not exist in the main URI. Therefore I have referenced my GitHub fork from which the PR is being raised. If/once accepted, a future patch could change 'jmtd' to 'jboss-container-images' and 'OPENJDK-1549-maven-args-take-2' to 'ubi9' so that the test tracks any changes made to the project in the main line. A future enhancement to behave-test-steps may be to permit S2I builds from a local path relative to the image source repository rather than requiring an absolute URI to clone from. That would remove the need for the above. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent f2a6135 commit 78e3bcf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/features/java/java_s2i.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,8 @@ Feature: Openshift OpenJDK S2I tests
166166
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
167167
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:server[ns:id='myrepo']
168168
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:profile[ns:id='myrepo-profile']/ns:repositories/ns:repository[ns:url='http://repo.example.com:8080/maven2/']
169+
170+
Scenario: Ensure the environment is cleaned when executing mvn (OPENJDK-1549)
171+
Given s2i build https://github.com/jmtd/openjdk from tests/OPENJDK-1549 with env using OPENJDK-1549-maven-args-take-2
172+
| variable | value |
173+
| MAVEN_ARGS | validate |

0 commit comments

Comments
 (0)