-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenshift_s2i.feature
83 lines (77 loc) · 6.09 KB
/
openshift_s2i.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@openshift @eap_6_4 @eap_7_0 @webserver_tomcat7 @webserver_tomcat8
Feature: Openshift S2I tests
# NOTE: these builds does not actually run maven. This is important, because the proxy
# options supplied do not specify a valid HTTP proxy.
# handles mirror/repository configuration; proxy configuration
Scenario: deploys the spring-eap6-quickstart example, then checks if it's deployed.
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart
| variable | value |
| MAVEN_MIRROR_URL | http://127.0.0.1:8080/repository/internal/ |
| HTTP_PROXY_HOST | 127.0.0.1 |
| HTTP_PROXY_PORT | 8080 |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:proxy[ns:id='genproxy'][ns:active='true'][ns:protocol='http'][ns:host='127.0.0.1'][ns:port='8080']
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:mirror[ns:id='mirror.default'][ns:url='http://127.0.0.1:8080/repository/internal/'][ns:mirrorOf='external:*']
# proxy auth configuration (success case) + nonProxyHosts
Scenario: deploys the spring-eap6-quickstart example, then checks if it's deployed.
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart
| variable | value |
| HTTP_PROXY_HOST | 127.0.0.1 |
| HTTP_PROXY_PORT | 8080 |
| HTTP_PROXY_USERNAME | myuser |
| HTTP_PROXY_PASSWORD | mypass |
| HTTP_PROXY_NONPROXYHOSTS | *.example.com |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:proxy[ns:id='genproxy'][ns:active='true'][ns:protocol='http'][ns:host='127.0.0.1'][ns:port='8080'][ns:username='myuser'][ns:password='mypass'][ns:nonProxyHosts='*.example.com']
# proxy auth configuration (fail case: no password supplied)
Scenario: deploys the spring-eap6-quickstart example, then checks if it's deployed.
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart
| variable | value |
| HTTP_PROXY_HOST | 127.0.0.1 |
| HTTP_PROXY_PORT | 8080 |
| HTTP_PROXY_USERNAME | myuser |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:proxy[ns:id='genproxy'][ns:active='true'][ns:protocol='http'][ns:host='127.0.0.1'][ns:port='8080']
# handles mirror/repository configuration; proxy configuration with custom settings.xml
Scenario: deploys the spring-eap6-quickstart-custom example, then checks that settings.xml is customized
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart-custom-configuration
| variable | value |
| MAVEN_MIRROR_URL | http://127.0.0.1:8080/repository/internal/ |
| HTTP_PROXY_HOST | 127.0.0.1 |
| HTTP_PROXY_PORT | 8080 |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:proxy[ns:id='genproxy'][ns:active='true'][ns:protocol='http'][ns:host='127.0.0.1'][ns:port='8080']
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:mirror[ns:id='mirror.default'][ns:url='http://127.0.0.1:8080/repository/internal/'][ns:mirrorOf='external:*']
Then XML file /home/jboss/.m2/settings.xml should contain value CUSTOM on XPath //ns:description
Scenario: Check if MAVEN_MIRROR_URL variant is working
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart
| variable | value |
| MAVEN_MIRROR_ID | mirror_foo |
| MAVEN_MIRROR_URL | http://127.0.0.1:8080/repository/internal/ |
| MAVEN_MIRROR_OF | * |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:mirror[ns:id='mirror_foo'][ns:url='http://127.0.0.1:8080/repository/internal/'][ns:mirrorOf='*']
Scenario: Check if MAVEN_MIRRORS is working
Given s2i build https://github.com/jboss-openshift/openshift-examples from spring-eap6-quickstart
| variable | value |
| MAVEN_MIRRORS | foo,bar,willfail |
| foo_MAVEN_MIRROR_URL | http://127.0.0.1:8080/repository/internal/ |
| bar_MAVEN_MIRROR_ID | mirror_bar |
| bar_MAVEN_MIRROR_URL | http://127.0.0.1:9090/repository/other/ |
| bar_MAVEN_MIRROR_OF | * |
And XML namespaces
| prefix | url |
| ns | http://maven.apache.org/SETTINGS/1.0.0 |
Then XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:mirror[ns:id='mirror1'][ns:url='http://127.0.0.1:8080/repository/internal/'][ns:mirrorOf='external:*']
And XML file /home/jboss/.m2/settings.xml should have 1 elements on XPath //ns:mirror[ns:id='mirror_bar'][ns:url='http://127.0.0.1:9090/repository/other/'][ns:mirrorOf='*']
And s2i build log should contain WARNING: Variable "willfail_MAVEN_MIRROR_URL" not set. Skipping maven mirror setup for the prefix "willfail".