Skip to content

Commit 5974d3d

Browse files
adding debug info for crossdomainxaction test (#2111)
Co-authored-by: [email protected] <[email protected]>
1 parent 91b6dcb commit 5974d3d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/BuildApplication.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,30 @@ public static Path buildApplication(Path appSrcPath, Map<String, String> antPara
152152
} catch (ApiException | IOException ioex) {
153153
logger.info("Exception while copying file " + zipFile + " to pod", ioex);
154154
}
155+
155156
try {
156157
//copy the build script to /u01 location inside pod
157158
Kubernetes.copyFileToPod(namespace, webLogicPod.getMetadata().getName(),
158159
null, BUILD_SCRIPT_SOURCE_PATH, Paths.get("/u01", BUILD_SCRIPT));
159160
} catch (ApiException | IOException ioex) {
160161
logger.info("Exception while copying file " + zipFile + " to pod", ioex);
161162
}
163+
logger.info("kubectl copied " + BUILD_SCRIPT + " into the pod");
164+
165+
// One of the test is failing in running the BUILD_SCRIPT (build_application.sh) - reason: the script does not exist
166+
// Adding the following to check if the script is copied and it has execute permissions
167+
try {
168+
ExecResult ex = Exec.exec(webLogicPod, null, false, "/bin/ls", "-ls", "/u01");
169+
if (ex.stdout() != null) {
170+
logger.info("Exec stdout {0}", ex.stdout());
171+
}
172+
if (ex.stderr() != null) {
173+
logger.info("Exec stderr {0}", ex.stderr());
174+
}
175+
} catch (ApiException | IOException | InterruptedException ioex) {
176+
logger.info("Exception while listing the files in /u01", ioex);
177+
}
178+
162179
try {
163180
//Kubernetes.exec(webLogicPod, new String[]{"/bin/sh", "/u01/" + BUILD_SCRIPT});
164181
ExecResult exec = Exec.exec(webLogicPod, null, false, "/bin/sh", "/u01/" + BUILD_SCRIPT);

0 commit comments

Comments
 (0)