brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [43/50] git commit: delete the app added in new test, because other method assumes just one app
Date Wed, 09 Jul 2014 21:46:56 GMT
delete the app added in new test, because other method assumes just one app


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

Branch: refs/heads/master
Commit: 95da84a1ef8870e42d33987871aa886497a81beb
Parents: 21afbc2
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Jul 9 12:10:31 2014 -0400
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Jul 9 22:34:47 2014 +0100

----------------------------------------------------------------------
 .../rest/resources/ApplicationResourceTest.java         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/95da84a1/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceTest.java
b/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceTest.java
index a3c9a8f..1a030a9 100644
--- a/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceTest.java
+++ b/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceTest.java
@@ -42,6 +42,7 @@ import org.testng.annotations.Test;
 import brooklyn.entity.Application;
 import brooklyn.entity.basic.BasicApplication;
 import brooklyn.entity.basic.BasicEntity;
+import brooklyn.entity.basic.Entities;
 import brooklyn.entity.basic.EntityFunctions;
 import brooklyn.entity.basic.Lifecycle;
 import brooklyn.location.Location;
@@ -219,6 +220,7 @@ public class ApplicationResourceTest extends BrooklynRestResourceTest
{
     assertEquals(client().resource(appUri).get(ApplicationSummary.class).getSpec().getName(),
"simple-app-yaml");
   }
 
+  @SuppressWarnings("deprecation")
   @Test
   public void testReferenceCatalogEntity() throws Exception {
       getManagementContext().getCatalog().addItem(BasicEntity.class);
@@ -234,6 +236,10 @@ public class ApplicationResourceTest extends BrooklynRestResourceTest
{
     URI appUri = response.getLocation();
     waitForApplicationToBeRunning(response.getLocation());
     assertEquals(client().resource(appUri).get(ApplicationSummary.class).getSpec().getName(),
"simple-app-yaml");
+    
+    ClientResponse response2 = client().resource(appUri.getPath())
+        .delete(ClientResponse.class);
+    assertEquals(response2.getStatus(), Response.Status.ACCEPTED.getStatusCode());
   }
 
   @Test
@@ -350,6 +356,12 @@ public class ApplicationResourceTest extends BrooklynRestResourceTest
{
     
     Collection groupMembers = (Collection) groupDetails.get("members");
     Assert.assertNotNull(groupMembers);
+    
+    for (Application appi: getManagementContext().getApplications()) {
+        Entities.dumpInfo(appi);
+    }
+    log.info("MEMBERS: "+groupMembers);
+    
     Assert.assertEquals(groupMembers.size(), 3); // includes the app too?!
     Map entityMemberDetails = (Map) Iterables.find(groupMembers, withValueForKey("name",
"simple-ent"), null);
     Map groupMemberDetails = (Map) Iterables.find(groupMembers, withValueForKey("name", "simple-group"),
null);


Mime
View raw message