Skip to content

Commit 3fe4b20

Browse files
committed
fix
1 parent 86b8386 commit 3fe4b20

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
121121
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully)) {
122122
domain.destroy();
123123
}
124-
restoreDomainTemplate();
125124
}
126125
logger.info("SUCCESS - " + testMethodName);
127126
}
@@ -178,7 +177,6 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
178177
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully)) {
179178
domain.destroy();
180179
}
181-
restoreDomainTemplate();
182180
}
183181
logger.info("SUCCESS - " + testMethodName);
184182
}
@@ -194,9 +192,6 @@ public void testCreateDomainTwoClusterWDTInImage() throws Exception {
194192
String DOMAINUID = "twoclusterdomainwdt";
195193
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
196194
logTestBegin(testMethodName);
197-
// String wdttemplate =
198-
// BaseTest.getProjectRoot()
199-
// + "/integration-tests/src/test/resources/wdt/config.cluster.topology.yaml";
200195
logger.info("Creating Operator & waiting for the script to complete execution");
201196
if (operator1 == null) {
202197
operator1 = TestUtils.createOperator(OPERATOR1_YAML);
@@ -206,7 +201,6 @@ public void testCreateDomainTwoClusterWDTInImage() throws Exception {
206201
try {
207202
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAININIMAGE_WDT_YAML);
208203
domainMap.put("domainUID", DOMAINUID);
209-
// domainMap.put("initialManagedServerReplicas", 4);
210204
if ((System.getenv("LB_TYPE") != null && System.getenv("LB_TYPE").equalsIgnoreCase("VOYAGER"))
211205
|| (domainMap.containsKey("loadBalancer")
212206
&& ((String) domainMap.get("loadBalancer")).equalsIgnoreCase("VOYAGER"))) {
@@ -216,21 +210,7 @@ public void testCreateDomainTwoClusterWDTInImage() throws Exception {
216210
"customWdtTemplate",
217211
BaseTest.getProjectRoot()
218212
+ "/integration-tests/src/test/resources/multipleclusters/wdtmultipledynclusters.yml");
219-
domainMap.put(
220-
"customDomainTemplate",
221-
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/multipleclusters/");
222213
addCluster2ToDomainTemplate(domainMap);
223-
// logger.log(Level.INFO, "Making a backup of the wdt template file:{0}", wdttemplate);
224-
// if (!Files.exists(Paths.get(wdttemplate + ".org"))) {
225-
// Files.copy(Paths.get(wdttemplate), Paths.get(wdttemplate + ".org"));
226-
// }
227-
// Files.copy(
228-
// Paths.get(
229-
// BaseTest.getProjectRoot()
230-
// +
231-
// "/integration-tests/src/test/resources/multipleclusters/wdtmultipledynclusters.yml"),
232-
// Paths.get(wdttemplate),
233-
// StandardCopyOption.REPLACE_EXISTING);
234214
domain = TestUtils.createDomain(domainMap);
235215
domain.verifyDomainCreated();
236216
String pods[] = {
@@ -250,14 +230,6 @@ public void testCreateDomainTwoClusterWDTInImage() throws Exception {
250230
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully)) {
251231
domain.destroy();
252232
}
253-
// restoreDomainTemplate();
254-
// if (Files.exists(Paths.get(wdttemplate + ".org"))) {
255-
// Files.copy(
256-
// Paths.get(wdttemplate + ".org"),
257-
// Paths.get(wdttemplate),
258-
// StandardCopyOption.REPLACE_EXISTING);
259-
// Files.deleteIfExists(Paths.get(wdttemplate + ".org"));
260-
// }
261233
}
262234
logger.log(Level.INFO, "SUCCESS - {0}", testMethodName);
263235
}
@@ -282,17 +254,6 @@ private void addCluster2ToDomainTemplate(Map<String, Object> domainMap) throws I
282254
logger.info(new String(readAllBytes, StandardCharsets.UTF_8));
283255
}
284256

285-
/**
286-
* Restore the domain template to original state when test is finished
287-
*
288-
* @throws IOException
289-
*/
290-
private void restoreDomainTemplate() throws IOException {
291-
Files.copy(
292-
Paths.get(template + ".org"), Paths.get(template), StandardCopyOption.REPLACE_EXISTING);
293-
Files.delete(Paths.get(template + ".org"));
294-
}
295-
296257
/**
297258
* Verifies all of the servers in the cluster are in Running status
298259
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,8 +1395,8 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
13951395
if (inputDomainMap.containsKey("customDomainTemplate")) {
13961396
Files.copy(
13971397
Paths.get((String) inputDomainMap.get("customDomainTemplate")),
1398-
Paths.get(
1399-
BaseTest.getResultDir() + "/kubernetes/samples/scripts/common/domain-template.yaml"));
1398+
Paths.get(BaseTest.getResultDir() + "/samples/scripts/common/domain-template.yaml"),
1399+
StandardCopyOption.REPLACE_EXISTING);
14001400
}
14011401

14021402
this.voyager =

0 commit comments

Comments
 (0)