Skip to content

Commit 8906496

Browse files
committed
[OPENJDK-1964] 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. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 4162075 commit 8906496

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
@@ -138,6 +138,23 @@ Feature: Openshift OpenJDK S2I tests
138138
Then s2i build log should not contain skipping directory .
139139
And run find /deployments in container and check its output for spring-boot-sample-simple-1.5.0.BUILD-SNAPSHOT.jar
140140

141+
# OPENJDK-1954 - MAVEN_REPOS
142+
Scenario: run the s2i and check the maven mirror and proxy have been initialised in the default settings.xml, uses http_proxy
143+
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple/target
144+
| variable | value |
145+
| MAVEN_REPOS | TESTREPO,ANOTHER |
146+
| TESTREPO_MAVEN_REPO_URL | http://repo.example.com:8080/maven2/ |
147+
| TESTREPO_MAVEN_REPO_ID | myrepo |
148+
| ANOTHER_MAVEN_REPO_URL | https://repo.example.org:8888/ |
149+
| ANOTHER_MAVEN_REPO_ID | another |
150+
And XML namespaces
151+
| prefix | url |
152+
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
153+
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:server[ns:id='myrepo']
154+
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/']
155+
Then XML file /tmp/artifacts/configuration/settings.xml should have 1 elements on XPath //ns:server[ns:id='another']
156+
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/']
157+
141158
# OPENJDK-1961: MAVEN_REPO_URL and MAVEN_REPO_ID
142159
Scenario: Check MAVEN_REPO_URL generates Maven settings and profile configuration
143160
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-boot-sample-simple/target

0 commit comments

Comments
 (0)