Skip to content

Commit e3c8742

Browse files
committed
[OPENJDK-2069] Tests for MAVEN_REPOS
MAVEN_REPOS had no test coverage. Add a test for it which defines two repositories. Use all-caps for the repository identifiers, which is an undocumented requirement. (Cherry pick from OPENJDK-1964) Signed-off-by: Jonathan Dowland <[email protected]>
1 parent a49f951 commit e3c8742

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/features/java/java_s2i.feature

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,23 @@ Feature: Openshift OpenJDK S2I tests
294294
Then s2i build log should not contain skipping directory .
295295
And run find /deployments in container and check its output for spring-boot-sample-simple-1.5.0.BUILD-SNAPSHOT.jar
296296

297+
# OPENJDK-2069 - MAVEN_REPOS
298+
Scenario: run the s2i and check the maven mirror and proxy have been initialised in the default settings.xml, uses http_proxy
299+
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple/target
300+
| variable | value |
301+
| MAVEN_REPOS | TESTREPO,ANOTHER |
302+
| TESTREPO_MAVEN_REPO_URL | http://repo.example.com:8080/maven2/ |
303+
| TESTREPO_MAVEN_REPO_ID | myrepo |
304+
| ANOTHER_MAVEN_REPO_URL | https://repo.example.org:8888/ |
305+
| ANOTHER_MAVEN_REPO_ID | another |
306+
And XML namespaces
307+
| prefix | url |
308+
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
309+
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:server[ns:id='myrepo']
310+
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/']
311+
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:server[ns:id='another']
312+
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:profile[ns:id='another-profile']/ns:repositories/ns:repository[ns:url='https://repo.example.org:8888/']
313+
297314
# OPENJDK-2068: MAVEN_REPO_URL and MAVEN_REPO_ID
298315
Scenario: Check MAVEN_REPO_URL generates Maven settings and profile configuration
299316
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple/target

0 commit comments

Comments
 (0)