brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [2/4] incubator-brooklyn git commit: ShellTool/SshTool tests: always call connect()
Date Tue, 24 Nov 2015 18:07:50 GMT
ShellTool/SshTool tests: always call connect()

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/6eddb66f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/6eddb66f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/6eddb66f

Branch: refs/heads/master
Commit: 6eddb66fd4619b0b80924ab7a002ac1854d53ae8
Parents: c89d136
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Nov 24 17:36:20 2015 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Nov 24 17:36:20 2015 +0000

----------------------------------------------------------------------
 .../brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java   | 4 ++++
 .../util/core/internal/ssh/SshToolAbstractIntegrationTest.java   | 1 +
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/6eddb66f/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java
b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java
index ca3e0f5..a9d34a5 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ShellToolAbstractTest.java
@@ -336,6 +336,7 @@ public abstract class ShellToolAbstractTest {
     @Test(groups = {"Integration"})
     public void testScriptHeader() {
         final ShellTool localtool = newTool();
+        connect(localtool);
         String out = execScript(MutableMap.of("scriptHeader", "#!/bin/bash -e\necho hello
world\n"), 
                 localtool, Arrays.asList("echo goodbye world"), null);
         assertTrue(out.contains("goodbye world"), "no goodbye in output: "+out);
@@ -345,6 +346,7 @@ public abstract class ShellToolAbstractTest {
     @Test(groups = {"Integration"})
     public void testStdErr() {
         final ShellTool localtool = newTool();
+        connect(localtool);
         Map<String,Object> props = new LinkedHashMap<String, Object>();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         ByteArrayOutputStream err = new ByteArrayOutputStream();
@@ -359,6 +361,7 @@ public abstract class ShellToolAbstractTest {
     @Test(groups = {"Integration"})
     public void testRunAsRoot() {
         final ShellTool localtool = newTool();
+        connect(localtool);
         Map<String,Object> props = new LinkedHashMap<String, Object>();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         ByteArrayOutputStream err = new ByteArrayOutputStream();
@@ -379,6 +382,7 @@ public abstract class ShellToolAbstractTest {
     @Test(groups = {"Integration"})
     public void testExecScriptEchosDontExecuteWhenToldNoExtraOutput() throws Exception {
         final ShellTool localtool = newTool();
+        connect(localtool);
         Map<String,Object> props = new LinkedHashMap<String, Object>();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         ByteArrayOutputStream err = new ByteArrayOutputStream();

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/6eddb66f/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/SshToolAbstractIntegrationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/SshToolAbstractIntegrationTest.java
b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/SshToolAbstractIntegrationTest.java
index a3bee86..07ca008 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/SshToolAbstractIntegrationTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/SshToolAbstractIntegrationTest.java
@@ -225,6 +225,7 @@ public abstract class SshToolAbstractIntegrationTest extends ShellToolAbstractTe
     @Test(groups = {"Integration"})
     public void testAllocatePty() {
         final ShellTool localtool = newTool(MutableMap.of("host", "localhost", SshTool.PROP_ALLOCATE_PTY.getName(),
true));
+        connect(localtool);
         Map<String,Object> props = new LinkedHashMap<String, Object>();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         ByteArrayOutputStream err = new ByteArrayOutputStream();


Mime
View raw message