Skip to content

Commit ed224ac

Browse files
authored
Merge pull request #1058 from oracle/voyager-integ-test
PR (ready to be merged): Voyager JIRA OWLS-73062
2 parents b6cc9ea + 4f89b95 commit ed224ac

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

integration-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ The tests accepts optional env var overrides:
209209
| RESULT_ROOT | The root directory to use for the tests temporary files. See "Directory Configuration and Structure" for defaults and a detailed description of test directories. |
210210
| PV_ROOT | The root directory on the kubernetes cluster used for persistent volumes. See "Directory Configuration and Structure" for defaults and a detailed description of test directories. |
211211
| QUICKTEST | When set to "true", limits testing to a subset of the tests. |
212-
| LB_TYPE | The default value is "TRAEFIK". Set to "VOYAGER" if you want to use it as LB. |
212+
| LB_TYPE | The default value is "TRAEFIK". Set to "VOYAGER" if you want to use it as LB. Using "VOYAGER" requires unique "voyagerWebPort"|
213213
| INGRESSPERDOMAIN | The defult value is true. If you want to test creating TRAEFIK LB by kubectl yaml for multiple domains, set it to false. |
214214
| SHARED_CLUSTER | Set to true if invoking on shared cluster, set to false or "" if running stand-alone or from Jenkins. Default is "". |
215215
| JENKINS | Set to true if invoking from Jenkins, set to false or "" if running stand-alone or on shared cluster. Default is "". |

integration-tests/src/test/java/oracle/kubernetes/operator/ITMultipleClusters.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
9393
"createDomainPyScript",
9494
"integration-tests/src/test/resources/domain-home-on-pv/"
9595
+ TWO_CONFIGURED_CLUSTER_SCRIPT);
96+
if ((System.getenv("LB_TYPE") != null && System.getenv("LB_TYPE").equalsIgnoreCase("VOYAGER"))
97+
|| (domainMap.containsKey("loadBalancer")
98+
&& ((String) domainMap.get("loadBalancer")).equalsIgnoreCase("VOYAGER"))) {
99+
domainMap.put("voyagerWebPort", new Integer("30366"));
100+
}
96101
addCluster2ToDomainTemplate();
97102
domain = TestUtils.createDomain(domainMap);
98103
domain.verifyDomainCreated();
@@ -136,6 +141,11 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
136141
domainMap.put(
137142
"createDomainPyScript",
138143
"integration-tests/src/test/resources/domain-home-on-pv/" + TWO_MIXED_CLUSTER_SCRIPT);
144+
if ((System.getenv("LB_TYPE") != null && System.getenv("LB_TYPE").equalsIgnoreCase("VOYAGER"))
145+
|| (domainMap.containsKey("loadBalancer")
146+
&& ((String) domainMap.get("loadBalancer")).equalsIgnoreCase("VOYAGER"))) {
147+
domainMap.put("voyagerWebPort", new Integer("30377"));
148+
}
139149
addCluster2ToDomainTemplate();
140150
domain = TestUtils.createDomain(domainMap);
141151
domain.verifyDomainCreated();

integration-tests/src/test/java/oracle/kubernetes/operator/ITStickySession.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public static void staticPrepare() throws Exception {
6363
logger.info("Creating WLS Domain & waiting for the script to complete execution");
6464
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPV_WLST_YAML);
6565
// Treafik doesn't work due to the bug 28050300. Use Voyager instead
66-
domainMap.put("LB_TYPE", "VOYAGER");
66+
domainMap.put("loadBalancer", "VOYAGER");
67+
domainMap.put("voyagerWebPort", new Integer("30355"));
6768
domain = TestUtils.createDomain(domainMap);
6869
domain.verifyDomainCreated();
6970
}

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,9 @@ protected void createLoadBalancer() throws Exception {
11361136
lbMap.put("serviceName", domainUid + "-cluster-" + domainMap.get("clusterName"));
11371137
if (voyager) {
11381138
lbMap.put("loadBalancer", "VOYAGER");
1139-
lbMap.put("loadBalancerWebPort", domainMap.get("voyagerWebPort"));
1139+
lbMap.put(
1140+
"loadBalancerWebPort",
1141+
domainMap.getOrDefault("voyagerWebPort", new Integer(loadBalancerWebPort)));
11401142
} else {
11411143
lbMap.put("loadBalancer", domainMap.getOrDefault("loadBalancer", loadBalancer));
11421144
lbMap.put(
@@ -1349,8 +1351,8 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
13491351

13501352
this.voyager =
13511353
(System.getenv("LB_TYPE") != null && System.getenv("LB_TYPE").equalsIgnoreCase("VOYAGER"))
1352-
|| (inputDomainMap.containsKey("LB_TYPE")
1353-
&& ((String) inputDomainMap.get("LB_TYPE")).equalsIgnoreCase("VOYAGER"));
1354+
|| (inputDomainMap.containsKey("loadBalancer")
1355+
&& ((String) inputDomainMap.get("loadBalancer")).equalsIgnoreCase("VOYAGER"));
13541356

13551357
if (System.getenv("INGRESSPERDOMAIN") != null) {
13561358
INGRESSPERDOMAIN = new Boolean(System.getenv("INGRESSPERDOMAIN")).booleanValue();

integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,12 @@ public static Map<String, Object> createDomainMap(int number) {
884884
domainMap.put("exposeAdminNodePort", true);
885885
domainMap.put("adminNodePort", 30700 + number);
886886
domainMap.put("t3ChannelPort", 30000 + number);
887+
if ((System.getenv("LB_TYPE") != null && System.getenv("LB_TYPE").equalsIgnoreCase("VOYAGER"))
888+
|| (domainMap.containsKey("loadBalancer")
889+
&& ((String) domainMap.get("loadBalancer")).equalsIgnoreCase("VOYAGER"))) {
890+
domainMap.put("voyagerWebPort", 30344 + number);
891+
logger.info("For this domain voyagerWebPort is set to: 30344 + " + number);
892+
}
887893
return domainMap;
888894
}
889895

integration-tests/src/test/resources/domaininimagewdt.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ configuredManagedServerCount: 4
77
initialManagedServerReplicas: 2
88
exposeAdminT3Channel: true
99
exposeAdminNodePort: true
10+
voyagerWebPort: 30333
1011
domainHomeImageBuildPath: ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt
1112
domainHomeImageBase: "store/oracle/weblogic:12.2.1.3"
1213
logHomeOnPV: true

integration-tests/src/test/resources/domaininimagewlst.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ configuredManagedServerCount: 4
77
initialManagedServerReplicas: 2
88
exposeAdminT3Channel: true
99
exposeAdminNodePort: true
10+
voyagerWebPort: 30322
1011
domainHomeImageBuildPath: ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image
1112
domainHomeImageBase: "store/oracle/weblogic:12.2.1.3"
1213
logHomeOnPV: true

0 commit comments

Comments
 (0)