From b2b0ac4ef846bbc2e82ac0eb7517e3a187e02174 Mon Sep 17 00:00:00 2001 From: David Russell Date: Mon, 16 Feb 2015 22:02:35 +0700 Subject: [PATCH] RW-670: Updated unit test for Windows. --- ...RUserExternalRepositoryShellCallsTest.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test/src/test/java/com/revo/deployr/client/api/RUserExternalRepositoryShellCallsTest.java b/test/src/test/java/com/revo/deployr/client/api/RUserExternalRepositoryShellCallsTest.java index faa4f1c..7bd4a90 100644 --- a/test/src/test/java/com/revo/deployr/client/api/RUserExternalRepositoryShellCallsTest.java +++ b/test/src/test/java/com/revo/deployr/client/api/RUserExternalRepositoryShellCallsTest.java @@ -86,8 +86,8 @@ public void testClientExternalRepositoryExecuteShell() { // Test. try { /* - * The echo.sh shell script lives by default in the - * following directory on disk within the external + * The echo.[sh,bat] shell script lives by default in + * the following directory on disk within the external * repository: * external/repository/public/admin which * maps to the following directory value: @@ -105,6 +105,9 @@ public void testClientExternalRepositoryExecuteShell() { if(exception == null) { try { + /* + * Test DeployR Linux/OSX Server. + */ consoleOutput = rClient.executeShell(shell.about().filename, shell.about().directory, @@ -112,8 +115,21 @@ public void testClientExternalRepositoryExecuteShell() { null, "Hello World!"); } catch(Exception ex) { - exception = ex; - exceptionMsg = "rClient.executeShell failed: "; + try { + /* + * Test DeployR Windows Server. + */ + consoleOutput = + rClient.executeShell("echo.bat", + shell.about().directory, + shell.about().author, + null, + "Hello World!"); + + } catch(Exception batex) { + exception = ex; + exceptionMsg = "rClient.executeShell failed: "; + } } }