Skip to content

Commit 8bdf98b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into ingress-clean
2 parents 38da137 + e41de3d commit 8bdf98b

39 files changed

+1602
-1349
lines changed

integration-tests/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ mvn -Dit.test="ITOperator#test6CreateConfiguredDomainInTest2NS" -DfailIfNoTests=
268268

269269
mvn -Dit.test="ITOperator#test6CreateConfiguredDomainInTest2NS+test7CreateDomainPVReclaimPolicyRecycle" -DfailIfNoTests=false integration-test -P java-integration-tests
270270

271+
# How to run cleanup script
272+
273+
cleanup script deletes the k8s artifacts, local test tmp directory, delete all helm charts and the potentially remote domain pv directories.
274+
cd weblogic-kubernetes-operator
275+
src/integration-tests/bash/cleanup.sh
276+
271277
# Logging/Archiving
272278

273279
Java utils logging is used, writes all the messages to console and java_test_suite.out in $RESULT_ROOT/acceptance_test_tmp directory.

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

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public void test1CreateFirstOperatorAndDomain() throws Exception {
9494
logTestBegin("test1CreateFirstOperatorAndDomain");
9595
testCreateOperatorManagingDefaultAndTest1NS();
9696
domain1 = testAllUseCasesForADomain(operator1, domain1YamlFile);
97+
domain1.testWlsLivenessProbe();
98+
domain1.destroy();
99+
97100
logger.info("SUCCESS - test1CreateFirstOperatorAndDomain");
98101
}
99102

@@ -128,6 +131,7 @@ public void test3CreateDomainInTest1NS() throws Exception {
128131
// create domain3
129132
Domain domain3 = testDomainCreation(domain3YamlFile);
130133
testWLDFScaling(operator1, domain3);
134+
domain3.destroy();
131135
logger.info("SUCCESS - test3CreateDomainInTest1NS");
132136
}
133137

@@ -157,6 +161,8 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
157161
}
158162
if (domain1 == null) {
159163
domain1 = TestUtils.createDomain(domain1YamlFile);
164+
} else {
165+
domain1.create();
160166
}
161167
logger.info("Checking if operator2 is running, if not creating");
162168
if (operator2 == null) {
@@ -179,6 +185,8 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
179185

180186
logger.info("Verify no impact on domain4");
181187
domain4.verifyDomainCreated();
188+
domain4.destroy();
189+
domain1.destroy();
182190
logger.info("SUCCESS - test5CreateConfiguredDomainInTest2NS");
183191
}
184192

@@ -194,7 +202,8 @@ public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
194202
}
195203
logger.info("Creating Domain domain5 & verifing the domain creation");
196204
// create domain5
197-
TestUtils.createDomain(domain5YamlFile);
205+
Domain domain5 = TestUtils.createDomain(domain5YamlFile);
206+
domain5.destroy();
198207
logger.info("SUCCESS - test6CreateDomainWithStartPolicyAdminOnly");
199208
}
200209

@@ -216,25 +225,6 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
216225
logger.info("SUCCESS - test7CreateDomainPVReclaimPolicyRecycle");
217226
}
218227

219-
@Test
220-
public void test8WlsLivenessProbe() throws Exception {
221-
222-
logTestBegin("test8WlsLivenessProbe");
223-
logger.info("Checking if operator1 is running, if not creating");
224-
if (operator1 == null) {
225-
operator1 = TestUtils.createOperator(op1YamlFile);
226-
}
227-
if (domain1 == null) {
228-
domain1 = TestUtils.createDomain(domain1YamlFile);
229-
}
230-
// test managed server1 pod auto restart
231-
String domain = domain1.getDomainUid();
232-
String namespace = domain1.getDomainMap().get("namespace").toString();
233-
String serverName = domain1.getDomainMap().get("managedServerNameBase").toString() + "1";
234-
TestUtils.testWlsLivenessProbe(domain, serverName, namespace);
235-
logger.info("SUCCESS - test8WlsLivenessProbe");
236-
}
237-
238228
@Test
239229
public void test9CreateDomainOnExistingDir() throws Exception {
240230
Assume.assumeFalse(
@@ -246,10 +236,10 @@ public void test9CreateDomainOnExistingDir() throws Exception {
246236
}
247237
if (domain1 == null) {
248238
domain1 = TestUtils.createDomain(domain1YamlFile);
239+
// create domain on existing dir
240+
domain1.destroy();
249241
}
250242
logger.info("domain1 " + domain1);
251-
// create domain on existing dir
252-
domain1.destroy();
253243
domain1.createDomainOnExistingDirectory();
254244
logger.info("SUCCESS - test9CreateDomainOnExistingDir");
255245
}
@@ -267,6 +257,7 @@ public void testACreateDomainApacheLB() throws Exception {
267257
// create domain7
268258
Domain domain7 = TestUtils.createDomain(domain7YamlFile);
269259
domain7.verifyAdminConsoleViaLB();
260+
domain7.destroy();
270261
logger.info("SUCCESS - testACreateDomainApacheLB");
271262
}
272263

@@ -281,7 +272,8 @@ public void testBCreateDomainWithDefaultValuesInSampleInputs() throws Exception
281272
}
282273

283274
// create domain8
284-
testAllUseCasesForADomain(operator1, domain8YamlFile);
275+
Domain domain8 = testAllUseCasesForADomain(operator1, domain8YamlFile);
276+
domain8.destroy();
285277
logger.info("SUCCESS - testBCreateDomainWithDefaultValuesInSampleInputs");
286278
}
287279

@@ -296,13 +288,9 @@ private Domain testAllUseCasesForADomain(Operator operator, String domainYamlFil
296288
logger.info("Creating Domain & verifing the domain creation");
297289
// create domain1
298290
Domain domain = testDomainCreation(domainYamlFile);
299-
if (System.getenv("QUICKTEST") == null
300-
|| (System.getenv("QUICKTEST") != null
301-
&& !System.getenv("QUICKTEST").equalsIgnoreCase("true"))) {
302-
testDomainLifecyle(operator, domain);
303-
testOperatorLifecycle(operator, domain);
304-
}
305291
testClusterScaling(operator, domain);
292+
testDomainLifecyle(operator, domain);
293+
testOperatorLifecycle(operator, domain);
306294
return domain;
307295
}
308296

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,13 @@ public String getDomainUid() {
510510
return domainUid;
511511
}
512512

513+
public void testWlsLivenessProbe() throws Exception {
514+
515+
// test managed server1 pod auto restart
516+
String serverName = managedServerNameBase + "1";
517+
TestUtils.testWlsLivenessProbe(domainUid, serverName, domainNS);
518+
}
519+
513520
private int getAdminSericeLBNodePort() throws Exception {
514521

515522
String adminServerLBNodePortService = domainUid + "-apache-webtier";

integration-tests/src/test/resources/wldf/wldf.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from java.io import File
44
import sys, socket
55
import os
6+
import time as systime
67
hostname = socket.gethostname()
78

89
k8s_master_host=os.environ.get('KUBERNETES_SERVICE_HOST')
@@ -63,4 +64,22 @@
6364
wh1.addNotification(scriptAct)
6465

6566
save()
66-
activate()
67+
activate(block='true')
68+
69+
print "wait for harvester watch to become active"
70+
71+
domainRuntime()
72+
73+
cd('ServerRuntimes/admin-server/WLDFRuntime/WLDFRuntime/WLDFWatchNotificationRuntime/WatchNotification')
74+
75+
numWatchEval=cmo.getTotalHarvesterWatchEvaluations()
76+
maxwait=300
77+
78+
while(numWatchEval < 1) and (maxwait > 0):
79+
print numWatchEval
80+
maxwait -= 1
81+
systime.sleep(1)
82+
numWatchEval=cmo.getTotalHarvesterWatchEvaluations()
83+
84+
print "wldf.py done numWatchEval is ", numWatchEval, " maxwait is ", maxwait
85+

model/src/main/java/oracle/kubernetes/weblogic/domain/v2/DomainSpec.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,8 @@ public String toString() {
560560
.appendSuper(super.toString())
561561
.append("domainUID", domainUID)
562562
.append("domainName", domainName)
563+
.append("domainHome", domainHome)
564+
.append("domainHomeInImage", domainHomeInImage)
563565
.append("adminSecret", adminSecret)
564566
.append("asName", asName)
565567
.append("asPort", asPort)
@@ -584,6 +586,8 @@ public int hashCode() {
584586
.appendSuper(super.hashCode())
585587
.append(domainUID)
586588
.append(domainName)
589+
.append(domainHome)
590+
.append(domainHomeInImage)
587591
.append(adminSecret)
588592
.append(asName)
589593
.append(asPort)
@@ -612,6 +616,8 @@ public boolean equals(Object other) {
612616
.appendSuper(super.equals(other))
613617
.append(domainUID, rhs.domainUID)
614618
.append(domainName, rhs.domainName)
619+
.append(domainHome, rhs.domainHome)
620+
.append(domainHomeInImage, rhs.domainHomeInImage)
615621
.append(adminSecret, rhs.adminSecret)
616622
.append(asName, rhs.asName)
617623
.append(asPort, rhs.asPort)

0 commit comments

Comments
 (0)