6
6
7
7
import static org .junit .Assert .assertTrue ;
8
8
9
+ import java .nio .charset .StandardCharsets ;
9
10
import java .nio .file .Files ;
10
11
import java .nio .file .Paths ;
11
12
import java .nio .file .StandardCopyOption ;
@@ -88,6 +89,7 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
88
89
try {
89
90
Map <String , Object > domainMap = TestUtils .loadYaml (DOMAINONPV_WLST_YAML );
90
91
domainMap .put ("domainUID" , DOMAINUID );
92
+ domainMap .put ("clusterType" , "CONFIGURED" );
91
93
domainMap .put (
92
94
"createDomainPyScript" ,
93
95
"integration-tests/src/test/resources/domain-home-on-pv/"
@@ -102,6 +104,8 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
102
104
Files .copy (Paths .get (template ), Paths .get (template + ".org" ));
103
105
}
104
106
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 ));
105
109
domain = TestUtils .createDomain (domainMap );
106
110
domain .verifyDomainCreated ();
107
111
K8sTestUtils testUtil = new K8sTestUtils ();
@@ -124,13 +128,11 @@ public void testCreateDomainTwoConfiguredCluster() throws Exception {
124
128
testCompletedSuccessfully = true ;
125
129
} finally {
126
130
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 ) {
132
131
domain .destroy ();
133
132
}
133
+ Files .copy (
134
+ Paths .get (template + ".org" ), Paths .get (template ), StandardCopyOption .REPLACE_EXISTING );
135
+ Files .delete (Paths .get (template + ".org" ));
134
136
}
135
137
logger .info ("SUCCESS - " + testMethodName );
136
138
}
@@ -170,6 +172,8 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
170
172
Files .copy (Paths .get (template ), Paths .get (template + ".org" ));
171
173
}
172
174
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 ));
173
177
domain = TestUtils .createDomain (domainMap );
174
178
domain .verifyDomainCreated ();
175
179
K8sTestUtils testUtil = new K8sTestUtils ();
@@ -192,13 +196,11 @@ public void testCreateDomainTwoMixedCluster() throws Exception {
192
196
testCompletedSuccessfully = true ;
193
197
} finally {
194
198
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 ) {
200
199
domain .destroy ();
201
200
}
201
+ Files .copy (
202
+ Paths .get (template + ".org" ), Paths .get (template ), StandardCopyOption .REPLACE_EXISTING );
203
+ Files .delete (Paths .get (template + ".org" ));
202
204
}
203
205
logger .info ("SUCCESS - " + testMethodName );
204
206
}
0 commit comments