Minor integration test fixes

* Request the correct "skipSecurity" mode
* Platform independent ssh result test
* Upgrade surefire to latest available


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/23117fce
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/23117fce
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/23117fce

Branch: refs/heads/master
Commit: 23117fce983b1be6f53434da93bd31bbf3b61c04
Parents: bfdf522
Author: Svetoslav Neykov <svetoslav.ney...@cloudsoftcorp.com>
Authored: Mon Nov 14 15:42:48 2016 +0200
Committer: Svetoslav Neykov <svetoslav.ney...@cloudsoftcorp.com>
Committed: Mon Nov 14 15:42:48 2016 +0200

----------------------------------------------------------------------
 .../brooklynnode/BrooklynEntityMirrorIntegrationTest.java       | 4 ++--
 pom.xml                                                         | 2 +-
 .../framework/SimpleShellCommandDeprecatedIntegrationTest.java  | 5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/23117fce/launcher/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/launcher/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java
 
b/launcher/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java
index 921de9e..e013884 100644
--- 
a/launcher/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java
+++ 
b/launcher/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java
@@ -78,7 +78,7 @@ public class BrooklynEntityMirrorIntegrationTest {
 
     
     protected void setUpServer() {
-        setUpServer(new LocalManagementContextForTests(), false);
+        setUpServer(new LocalManagementContextForTests(), true);
     }
     protected void setUpServer(ManagementContext mgmt, boolean skipSecurity) {
         try {
@@ -140,7 +140,7 @@ public class BrooklynEntityMirrorIntegrationTest {
         
mgmtHttps.getBrooklynProperties().put("brooklyn.webconsole.security.users", 
"admin");
         
mgmtHttps.getBrooklynProperties().put("brooklyn.webconsole.security.user.admin.password",
 "P5ssW0rd");
 
-        setUpServer(mgmtHttps, true);
+        setUpServer(mgmtHttps, false);
         Assert.assertTrue(getBaseUri().startsWith("https:"), "URL is not 
https: "+getBaseUri());
         // check auth is required
         HttpTestUtils.assertHttpStatusCodeEquals(getBaseUri(), 401);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/23117fce/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 01861bf..51618fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -179,7 +179,7 @@
         <mockito.version>1.10.8</mockito.version>
         <assertj.version>2.2.0</assertj.version> <!-- v 2.2.0 is being used as 
v 3.20 introduces Java8 dependencies-->
         <cobertura.plugin.version>2.7</cobertura.plugin.version>
-        <surefire.version>2.18.1</surefire.version>
+        <surefire.version>2.19.1</surefire.version>
         <plantuml.version>6121</plantuml.version>
         <ant.version>1.8.4</ant.version>
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/23117fce/test-framework/src/test/java/org/apache/brooklyn/test/framework/SimpleShellCommandDeprecatedIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/test-framework/src/test/java/org/apache/brooklyn/test/framework/SimpleShellCommandDeprecatedIntegrationTest.java
 
b/test-framework/src/test/java/org/apache/brooklyn/test/framework/SimpleShellCommandDeprecatedIntegrationTest.java
index f8fdbde..ab24c9f 100644
--- 
a/test-framework/src/test/java/org/apache/brooklyn/test/framework/SimpleShellCommandDeprecatedIntegrationTest.java
+++ 
b/test-framework/src/test/java/org/apache/brooklyn/test/framework/SimpleShellCommandDeprecatedIntegrationTest.java
@@ -116,7 +116,7 @@ public class SimpleShellCommandDeprecatedIntegrationTest 
extends BrooklynAppUnit
 
         SimpleShellCommandTest uptime = 
app.createAndManageChild(EntitySpec.create(SimpleShellCommandTest.class)
             .configure(TARGET_ENTITY, testEntity)
-            .configure(COMMAND, "uptime"));
+            .configure(COMMAND, "date"));
 
         app.start(ImmutableList.<Location>of());
 
@@ -138,7 +138,8 @@ public class SimpleShellCommandDeprecatedIntegrationTest 
extends BrooklynAppUnit
         try {
             app.start(ImmutableList.<Location>of());
         } catch (Throwable t) {
-            Asserts.expectedFailureContains(t, "exit code expected equals 0 
but found 1");
+            // Used to be "but found 1", I'm getting "but found 2". Could be 
OS specific.
+            Asserts.expectedFailureContains(t, "exit code expected equals 0 
but found ");
         }
 
         assertThat(uptime.sensors().get(SERVICE_UP)).isFalse()

Reply via email to