Skip to content

Commit 715ead0

Browse files
committed
add logging
1 parent a8273cc commit 715ead0

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import static org.junit.Assert.assertTrue;
88

9+
import java.nio.charset.StandardCharsets;
910
import java.nio.file.Files;
1011
import java.nio.file.Paths;
1112
import java.nio.file.StandardCopyOption;
@@ -88,6 +89,7 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
8889
try {
8990
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPV_WLST_YAML);
9091
domainMap.put("domainUID", DOMAINUID);
92+
domainMap.put("clusterType", "CONFIGURED");
9193
domainMap.put(
9294
"createDomainPyScript",
9395
"integration-tests/src/test/resources/domain-home-on-pv/"
@@ -102,6 +104,8 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
102104
Files.copy(Paths.get(template), Paths.get(template + ".org"));
103105
}
104106
Files.write(Paths.get(template), add.getBytes(), StandardOpenOption.APPEND);
107+
byte[] readAllBytes = Files.readAllBytes(Paths.get(template));
108+
logger.info(new String(readAllBytes, StandardCharsets.UTF_8));
105109
domain = TestUtils.createDomain(domainMap);
106110
domain.verifyDomainCreated();
107111
K8sTestUtils testUtil = new K8sTestUtils();
@@ -124,13 +128,11 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
124128
testCompletedSuccessfully = true;
125129
} finally {
126130
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully)) {
127-
Files.copy(
128-
Paths.get(template + ".org"), Paths.get(template), StandardCopyOption.REPLACE_EXISTING);
129-
Files.delete(Paths.get(template + ".org"));
130-
}
131-
if (domain != null) {
132131
domain.destroy();
133132
}
133+
Files.copy(
134+
Paths.get(template + ".org"), Paths.get(template), StandardCopyOption.REPLACE_EXISTING);
135+
Files.delete(Paths.get(template + ".org"));
134136
}
135137
logger.info("SUCCESS - " + testMethodName);
136138
}
@@ -170,6 +172,8 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
170172
Files.copy(Paths.get(template), Paths.get(template + ".org"));
171173
}
172174
Files.write(Paths.get(template), add.getBytes(), StandardOpenOption.APPEND);
175+
byte[] readAllBytes = Files.readAllBytes(Paths.get(template));
176+
logger.info(new String(readAllBytes, StandardCharsets.UTF_8));
173177
domain = TestUtils.createDomain(domainMap);
174178
domain.verifyDomainCreated();
175179
K8sTestUtils testUtil = new K8sTestUtils();
@@ -192,13 +196,11 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
192196
testCompletedSuccessfully = true;
193197
} finally {
194198
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully)) {
195-
Files.copy(
196-
Paths.get(template + ".org"), Paths.get(template), StandardCopyOption.REPLACE_EXISTING);
197-
Files.delete(Paths.get(template + ".org"));
198-
}
199-
if (domain != null) {
200199
domain.destroy();
201200
}
201+
Files.copy(
202+
Paths.get(template + ".org"), Paths.get(template), StandardCopyOption.REPLACE_EXISTING);
203+
Files.delete(Paths.get(template + ".org"));
202204
}
203205
logger.info("SUCCESS - " + testMethodName);
204206
}

0 commit comments

Comments
 (0)