Skip to content

Commit 6a197e8

Browse files
add YAMLSTYLEINGRESS LB ingress
1 parent be168fd commit 6a197e8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

integration-tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ The tests accepts optional env var overrides:
204204
| 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. |
205205
| 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. |
206206
| QUICKTEST | When set to "true", limits testing to a subset of the tests. |
207+
| YAMLSTYLEINGRESS | When set to "true", LB's ingress will be created by kubectl yaml file. |
207208
| WERCKER | Set to true if invoking from Wercker, set to false or "" if running stand-alone or from Jenkins. Default is "". |
208209
| JENKINS | Set to true if invoking from Jenkins, set to false or "" if running stand-alone or from Wercker. Default is "". |
209210
| NODEPORT_HOST | DNS name of a Kubernetes worker node. Default is the local host's hostname. |

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ public class ITOperator extends BaseTest {
5454
private static boolean QUICKTEST;
5555
private static boolean SMOKETEST;
5656
private static boolean JENKINS;
57+
private static boolean YAMLSTYLEINGRESS;
5758

5859
// Set QUICKTEST env var to true to run a small subset of tests.
5960
// Set SMOKETEST env var to true to run an even smaller subset
6061
// of tests, plus leave domain1 up and running when the test completes.
62+
// set YAMLSTYLEINGRESS to true to create LB's ingress by kubectl yaml file
6163
static {
6264
QUICKTEST =
6365
System.getenv("QUICKTEST") != null && System.getenv("QUICKTEST").equalsIgnoreCase("true");
@@ -67,6 +69,9 @@ public class ITOperator extends BaseTest {
6769
if (System.getenv("JENKINS") != null) {
6870
JENKINS = new Boolean(System.getenv("JENKINS")).booleanValue();
6971
}
72+
YAMLSTYLEINGRESS =
73+
System.getenv("YAMLSTYLEINGRESS") != null
74+
&& System.getenv("YAMLSTYLEINGRESS").equalsIgnoreCase("true");
7075
}
7176

7277
/**
@@ -231,6 +236,12 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
231236
wlstDomainMap.put("domainUID", "domain1onpvwlst");
232237
wlstDomainMap.put("adminNodePort", new Integer("30702"));
233238
wlstDomainMap.put("t3ChannelPort", new Integer("30031"));
239+
if (YAMLSTYLEINGRESS) {
240+
wlstDomainMap.put("ingressPerDomain", new Boolean("false"));
241+
logger.info(
242+
"domain1onpvwlst ingressPerDomain is set to: "
243+
+ ((Boolean) wlstDomainMap.get("ingressPerDomain")).booleanValue());
244+
}
234245
domain1 = TestUtils.createDomain(wlstDomainMap);
235246
domain1.verifyDomainCreated();
236247
testBasicUseCases(domain1);
@@ -246,6 +257,12 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
246257
wdtDomainMap.put("adminNodePort", new Integer("30703"));
247258
wdtDomainMap.put("t3ChannelPort", new Integer("30041"));
248259
// wdtDomainMap.put("clusterType", "Configured");
260+
if (YAMLSTYLEINGRESS) {
261+
wdtDomainMap.put("ingressPerDomain", new Boolean("false"));
262+
logger.info(
263+
"domain2onpvwdt ingressPerDomain is set to: "
264+
+ ((Boolean) wdtDomainMap.get("ingressPerDomain")).booleanValue());
265+
}
249266
domain2 = TestUtils.createDomain(wdtDomainMap);
250267
domain2.verifyDomainCreated();
251268
testBasicUseCases(domain2);

0 commit comments

Comments
 (0)