brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [30/34] brooklyn-server git commit: fix tests which expected a particular result
Date Thu, 18 Feb 2016 15:47:48 GMT
fix tests which expected a particular result


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

Branch: refs/heads/master
Commit: 7f047baaa1e029b41977e3316cd990f1cc13eb7e
Parents: 79b98c6
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Thu Feb 18 11:16:37 2016 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Thu Feb 18 11:16:37 2016 +0000

----------------------------------------------------------------------
 .../apache/brooklyn/rest/resources/ApplicationResourceTest.java | 4 +++-
 .../org/apache/brooklyn/rest/resources/CatalogResourceTest.java | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7f047baa/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java
index 6091096..b9a6e9b 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java
@@ -85,10 +85,12 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
+
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.MultivaluedHashMap;
+
 import org.apache.cxf.jaxrs.client.WebClient;
 
 @Test(singleThreaded = true,
@@ -645,7 +647,7 @@ public class ApplicationResourceTest extends BrooklynRestResourceTest
{
             Response response3 = client().path("/applications")
                     .post(Entity.entity(yaml3, "application/x-yaml"));
             HttpAsserts.assertClientErrorStatusCode(response3.getStatus());
-            assertTrue(response3.readEntity(String.class).contains("cannot be matched"));
+            assertTrue(response3.readEntity(String.class).toLowerCase().contains("unable
to match"));
             waitForPageNotFoundResponse("/applications/my-app3", ApplicationSummary.class);
             
         } finally {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7f047baa/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
index b6a77d5..8d5d017 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
@@ -47,6 +47,7 @@ import org.apache.brooklyn.test.support.TestResourceUnavailableException;
 import org.apache.brooklyn.util.javalang.Reflections;
 import org.apache.http.HttpHeaders;
 import org.apache.http.entity.ContentType;
+import org.eclipse.jetty.http.HttpStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
@@ -55,7 +56,9 @@ import org.testng.reporters.Files;
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.Iterables;
+
 import java.io.InputStream;
+
 import javax.ws.rs.core.GenericType;
 
 @Test( // by using a different suite name we disallow interleaving other tests between the
methods of this test class, which wrecks the test fixtures
@@ -501,7 +504,7 @@ public class CatalogResourceTest extends BrooklynRestResourceTest {
         Response response = client().path("/catalog")
                 .post(yaml);
 
-        assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
+        assertEquals(response.getStatus(), HttpStatus.BAD_REQUEST_400);
     }
 
     private static String ver(String id) {


Mime
View raw message