You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/09/23 20:46:07 UTC

[1/4] brooklyn-server git commit: Mark blueprint integration tests as “Broken”

Repository: brooklyn-server
Updated Branches:
  refs/heads/master 0bc231224 -> 6418c335f


Mark blueprint integration tests as \u201cBroken\u201d

The brooklyn-server repo does not include entities in brooklyn-library,
such as MongoDB, so cannot be tested here.

It should really be deleted (once we move them to a better home such
as use of the test-framework, with QA running regularly against the
catalog).

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

Branch: refs/heads/master
Commit: 42a547913e86b1e8a1b4d1de2cf9f68df0f5dc4d
Parents: 21a3664
Author: Aled Sage <al...@gmail.com>
Authored: Fri Sep 23 18:15:13 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Sep 23 18:15:13 2016 +0100

----------------------------------------------------------------------
 .../launcher/blueprints/CouchbaseBlueprintTest.java     | 12 ++++++------
 .../launcher/blueprints/MongoDbBlueprintTest.java       | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/42a54791/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java
index fde5b41..d4d2686 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java
@@ -22,22 +22,22 @@ import org.testng.annotations.Test;
 
 public class CouchbaseBlueprintTest extends AbstractBlueprintTest {
 
-    @Test(groups={"Live"})
+    @Test(groups={"Live", "Broken"})
     public void testCouchbaseNode() throws Exception {
         runTest("couchbase-node.yaml");
     }
 
-    @Test(groups={"Live"})
+    @Test(groups={"Live", "Broken"})
     public void testCouchbaseCluster() throws Exception {
         runTest("couchbase-cluster.yaml");
     }
 
-    @Test(groups={"Live"})
+    @Test(groups={"Live", "Broken"})
     public void testCouchbaseClusterSingleNode() throws Exception {
         runTest("couchbase-cluster-singleNode.yaml");
     }
     
-    @Test(groups={"Live"})
+    @Test(groups={"Live", "Broken"})
     public void testCouchbaseWithPillowfight() throws Exception {
         runTest("couchbase-w-pillowfight.yaml");
     }
@@ -53,7 +53,7 @@ public class CouchbaseBlueprintTest extends AbstractBlueprintTest {
      * This blueprint uses {minRam: 16384, minCores: 4}.
      * Suspect this is already fixed by Andrea Turli in latest jclouds.
      */
-    @Test(groups={"Live", "WIP"})
+    @Test(groups={"Live", "WIP", "Broken"})
     public void testCouchbaseWithLoadgen() throws Exception {
         runTest("couchbase-w-loadgen.yaml");
     }
@@ -62,7 +62,7 @@ public class CouchbaseBlueprintTest extends AbstractBlueprintTest {
      * FIXME Failed with "Unable to match required VM template constraints" - caused by NPE
      * (see error described at {@link #testCouchbaseWithLoadgen()}.
      */
-    @Test(groups={"Live", "WIP"})
+    @Test(groups={"Live", "WIP", "Broken"})
     public void testCouchbaseReplicationWithPillowfight() throws Exception {
         runTest("couchbase-replication-w-pillowfight.yaml");
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/42a54791/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/MongoDbBlueprintTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/MongoDbBlueprintTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/MongoDbBlueprintTest.java
index 33c8910..9097729 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/MongoDbBlueprintTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/MongoDbBlueprintTest.java
@@ -24,27 +24,27 @@ public class MongoDbBlueprintTest extends AbstractBlueprintTest {
 
     // TODO Some tests are failing! Needs investigated.
 
-    @Test(groups={"Integration", "WIP"})
+    @Test(groups={"Integration", "WIP", "Broken"})
     public void testMongoSharded() throws Exception {
         runTest("mongo-sharded.yaml");
     }
 
-    @Test(groups={"Integration"})
+    @Test(groups={"Integration", "Broken"})
     public void testMongoReplicaSet() throws Exception {
         runTest("mongo-blueprint.yaml");
     }
 
-    @Test(groups={"Integration"})
+    @Test(groups={"Integration", "Broken"})
     public void testMongoClientAndSingleServer() throws Exception {
         runTest("mongo-client-single-server.yaml");
     }
 
-    @Test(groups={"Integration", "WIP"})
+    @Test(groups={"Integration", "WIP", "Broken"})
     public void testMongoScripts() throws Exception {
         runTest("mongo-scripts.yaml");
     }
 
-    @Test(groups="Integration")
+    @Test(groups={"Integration", "Broken"})
     public void testMongoSingleServer() throws Exception {
         runTest("mongo-single-server-blueprint.yaml");
     }


[2/4] brooklyn-server git commit: Fix vanilla-software-process-with-resource.yaml

Posted by al...@apache.org.
Fix vanilla-software-process-with-resource.yaml

Typo of \u201ctempalte\u201d broke integration test, which broke
org.apache.brooklyn.rest.test.entity.VanillaSoftwareProcessTest

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

Branch: refs/heads/master
Commit: ab5d7b84940a7802bf807e590c1ccf1c6808c05a
Parents: 42a5479
Author: Aled Sage <al...@gmail.com>
Authored: Fri Sep 23 18:17:10 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Sep 23 18:17:10 2016 +0100

----------------------------------------------------------------------
 .../src/test/resources/vanilla-software-process-with-resource.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ab5d7b84/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml
----------------------------------------------------------------------
diff --git a/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml b/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml
index 26faa40..92687c5 100644
--- a/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml
+++ b/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml
@@ -23,7 +23,7 @@
 brooklyn.catalog:
   id: vanilla-software-resource-test
   version: "1.0"
-  itemType: tempalte
+  itemType: template
   libraries:
   - classpath://brooklyn/osgi/brooklyn-test-osgi-entities.jar
   item:


[3/4] brooklyn-server git commit: Re-write CreateUserPolicyTest to use RecordingSshTool

Posted by al...@apache.org.
Re-write CreateUserPolicyTest to use RecordingSshTool

Previously it use its own RecordingSshMachineLocation, so changing it
to use our more standard mechanism.

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

Branch: refs/heads/master
Commit: 384de14a710e1bbbccebd83a0f61ab158f29f116
Parents: ab5d7b8
Author: Aled Sage <al...@gmail.com>
Authored: Fri Sep 23 18:18:10 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Sep 23 18:18:10 2016 +0100

----------------------------------------------------------------------
 .../policy/jclouds/os/CreateUserPolicyTest.java | 45 +++++---------------
 1 file changed, 10 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/384de14a/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyTest.java
index 564ebe3..a089dfc 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicyTest.java
@@ -21,8 +21,6 @@ package org.apache.brooklyn.policy.jclouds.os;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
-import java.util.List;
-import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -32,53 +30,29 @@ import org.apache.brooklyn.api.policy.PolicySpec;
 import org.apache.brooklyn.core.entity.EntityAsserts;
 import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
 import org.apache.brooklyn.core.test.entity.TestEntity;
+import org.apache.brooklyn.location.ssh.SshMachineLocation;
+import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool;
+import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool.ExecCmd;
 import org.apache.brooklyn.util.core.internal.ssh.SshTool;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
 
 public class CreateUserPolicyTest extends BrooklynAppUnitTestSupport {
 
     @SuppressWarnings("unused")
     private static final Logger LOG = LoggerFactory.getLogger(CreateUserPolicyTest.class);
 
-    public static class RecordingSshMachineLocation extends SshMachineLocation {
-        public static List<List<String>> execScriptCalls = Lists.newArrayList();
-
-        @Override 
-        public int execScript(String summary, List<String> cmds) {
-            execScriptCalls.add(cmds);
-            return 0;
-        }
-        @Override 
-        public int execScript(Map<String,?> props, String summaryForLogging, List<String> cmds) {
-            execScriptCalls.add(cmds);
-            return 0;
-        }
-        @Override 
-        public int execScript(String summaryForLogging, List<String> cmds, Map<String,?> env) {
-            execScriptCalls.add(cmds);
-            return 0;
-        }
-        @Override 
-        public int execScript(Map<String,?> props, String summaryForLogging, List<String> cmds, Map<String,?> env) {
-            execScriptCalls.add(cmds);
-            return 0;
-        }
-    }
-
     @BeforeMethod(alwaysRun=true)
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        RecordingSshMachineLocation.execScriptCalls.clear();
+        RecordingSshTool.clear();
     }
 
     @AfterMethod(alwaysRun=true)
@@ -87,13 +61,14 @@ public class CreateUserPolicyTest extends BrooklynAppUnitTestSupport {
         try {
             super.tearDown();
         } finally {
-            RecordingSshMachineLocation.execScriptCalls.clear();
+            RecordingSshTool.clear();
         }
     }
     
     @Test
     public void testCallsCreateUser() throws Exception {
-        SshMachineLocation machine = mgmt.getLocationManager().createLocation(LocationSpec.create(RecordingSshMachineLocation.class)
+        SshMachineLocation machine = mgmt.getLocationManager().createLocation(LocationSpec.create(SshMachineLocation.class)
+                .configure(SshMachineLocation.SSH_TOOL_CLASS, RecordingSshTool.class.getName())
                 .configure(SshTool.PROP_USER, "myuser")
                 .configure(SshTool.PROP_PASSWORD, "mypassword")
                 .configure("address", "1.2.3.4")
@@ -124,12 +99,12 @@ public class CreateUserPolicyTest extends BrooklynAppUnitTestSupport {
         assertEquals(port, "1234");
 
         boolean found = false;
-        for (List<String> cmds : RecordingSshMachineLocation.execScriptCalls) {
-            if (cmds.toString().contains("useradd")) {
+        for (ExecCmd cmds : RecordingSshTool.getExecCmds()) {
+            if (cmds.commands.toString().contains("useradd")) {
                 found = true;
                 break;
             }
         }
-        assertTrue(found, "useradd not found in: "+RecordingSshMachineLocation.execScriptCalls);
+        assertTrue(found, "useradd not found in: "+RecordingSshTool.getExecCmds());
     }
 }


[4/4] brooklyn-server git commit: This closes #349

Posted by al...@apache.org.
This closes #349


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

Branch: refs/heads/master
Commit: 6418c335fb064bf559497d5ae848b62735a78670
Parents: 0bc2312 384de14
Author: Aled Sage <al...@gmail.com>
Authored: Fri Sep 23 21:45:43 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Sep 23 21:45:43 2016 +0100

----------------------------------------------------------------------
 .../blueprints/CouchbaseBlueprintTest.java      | 12 +++---
 .../blueprints/MongoDbBlueprintTest.java        | 10 ++---
 .../policy/jclouds/os/CreateUserPolicyTest.java | 45 +++++---------------
 .../vanilla-software-process-with-resource.yaml |  2 +-
 4 files changed, 22 insertions(+), 47 deletions(-)
----------------------------------------------------------------------