File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed
integration-tests/src/test/java/oracle/kubernetes/operator Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import java .util .Map ;
8
8
import oracle .kubernetes .operator .utils .Domain ;
9
- import oracle .kubernetes .operator .utils .ExecResult ;
10
9
import oracle .kubernetes .operator .utils .Operator ;
11
10
import oracle .kubernetes .operator .utils .Operator .RESTCertType ;
12
11
import oracle .kubernetes .operator .utils .TestUtils ;
@@ -254,20 +253,10 @@ public void testCreateDomainWithStartPolicyAdminOnly() throws Exception {
254
253
domain = TestUtils .createDomain (DOMAIN_ADMINONLY_YAML );
255
254
domain .verifyDomainCreated ();
256
255
} finally {
257
- Map <String , Object > domainMap = domain .getDomainMap ();
258
- String domainStoragePath = domainMap .get ("weblogicDomainStoragePath" ).toString ();
259
- String domainDir = domainStoragePath + "/domains/" + domainMap .get ("domainUID" ).toString ();
260
- ExecResult result =
261
- TestUtils .exec ("ls -ltr " + domainDir + " && ls -ltr " + domainStoragePath + "/domains/" );
262
- logger .info ("ls -ltr " + result .stdout () + " err " + result .stderr ());
263
-
264
256
if (domain != null ) {
265
257
// create domain on existing dir
266
258
domain .destroy ();
267
259
}
268
- result =
269
- TestUtils .exec ("ls -ltr " + domainDir + " && ls -ltr " + domainStoragePath + "/domains/" );
270
- logger .info ("ls -ltr " + result .stdout () + " err " + result .stderr ());
271
260
}
272
261
273
262
domain .createDomainOnExistingDirectory ();
Original file line number Diff line number Diff line change @@ -638,14 +638,18 @@ public void deletePVCAndCheckPVReleased() throws Exception {
638
638
public void createDomainOnExistingDirectory () throws Exception {
639
639
String domainStoragePath = domainMap .get ("weblogicDomainStoragePath" ).toString ();
640
640
String domainDir = domainStoragePath + "/domains/" + domainMap .get ("domainUID" ).toString ();
641
- logger .info ("making sure the domain directory exists" );
642
- ExecResult result =
643
- TestUtils .exec ("ls -ltr " + domainDir + " && ls -ltr " + domainStoragePath + "/domains/" );
644
- logger .info ("ls -ltr " + result .stdout () + " err " + result .stderr ());
645
- if (domainDir != null && !(new File (domainDir ).exists ())) {
641
+ String cmd =
642
+ BaseTest .getProjectRoot ()
643
+ + "/src/integration-tests/bash/krun.sh -c \" ls -ltr "
644
+ + domainDir
645
+ + "\" " ;
646
+ logger .info ("making sure the domain directory exists by running " + cmd );
647
+ ExecResult result = TestUtils .exec (cmd );
648
+ logger .info ("Command result " + result .stdout () + " err =" + result .stderr ());
649
+ /* if (domainDir != null && !(new File(domainDir).exists())) {
646
650
throw new RuntimeException(
647
651
"FAIL: the domain directory " + domainDir + " does not exist, exiting!");
648
- }
652
+ } */
649
653
logger .info ("Run the script to create domain" );
650
654
651
655
// create domain using different output dir but pv is same, it fails as the domain was already
You can’t perform that action at this time.
0 commit comments