Skip to content

Commit 7ac096b

Browse files
committed
address review comments
1 parent 40cf274 commit 7ac096b

File tree

1 file changed

+9
-11
lines changed
  • integration-tests/src/test/java/oracle/kubernetes/operator/utils

1 file changed

+9
-11
lines changed

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public static void testWlsLivenessProbe(String domainUid, String serverName, Str
233233
new File(filePath).setExecutable(true, false);
234234

235235
// copy file to pod
236-
kubectlexec(podName, namespace, " -- bash -c 'cat > /shared/killserver.sh' < " + filePath);
236+
copyFileViaCat(filePath, "/shared/killserver.sh", podName, namespace);
237237

238238
// kill server process 3 times
239239
for (int i = 0; i < 3; i++) {
@@ -724,20 +724,18 @@ public static void createWLDFModule(String adminPodName, String domainNS, int t3
724724
throws Exception {
725725

726726
// copy wldf.py script tp pod
727-
TestUtils.kubectlexec(
727+
copyFileViaCat(
728+
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/wldf/wldf.py",
729+
"/shared/wldf.py",
728730
adminPodName,
729-
domainNS,
730-
" -- bash -c 'cat > /shared/wldf.py' < "
731-
+ BaseTest.getProjectRoot()
732-
+ "/integration-tests/src/test/resources/wldf/wldf.py");
731+
domainNS);
733732

734733
// copy callpyscript.sh to pod
735-
TestUtils.kubectlexec(
734+
copyFileViaCat(
735+
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/callpyscript.sh",
736+
"/shared/callpyscript.sh",
736737
adminPodName,
737-
domainNS,
738-
" -- bash -c 'cat > /shared/callpyscript.sh' < "
739-
+ BaseTest.getProjectRoot()
740-
+ "/integration-tests/src/test/resources/callpyscript.sh");
738+
domainNS);
741739

742740
// arguments to shell script to call py script
743741
String arguments =

0 commit comments

Comments
 (0)