ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1571710 - in /ace/trunk/org.apache.ace.client.rest.itest: bnd.bnd src/org/apache/ace/client/rest/itest/ClientRestUtils.java src/org/apache/ace/client/rest/itest/RESTClientTest.java
Date Tue, 25 Feb 2014 14:31:17 GMT
Author: jawi
Date: Tue Feb 25 14:31:17 2014
New Revision: 1571710

URL: http://svn.apache.org/r1571710
Log:
ACE-456 - fixed failing itest:

- added missing workspace bundle + configuration;
- added additional assertion on createWorkspace to ensure that
  we've got a valid redirect. Otherwise, obscure NPEs will be
  thrown later in the test(s).


Modified:
    ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd
    ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ClientRestUtils.java
    ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java

Modified: ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd?rev=1571710&r1=1571709&r2=1571710&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd Tue Feb 25 14:31:17 2014
@@ -78,6 +78,7 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o
 	org.apache.ace.client.repository.impl;version=latest,\
 	org.apache.ace.deployment.provider.repositorybased;version=latest,\
 	org.apache.ace.client.rest;version=latest,\
+	org.apache.ace.client.workspace;version=latest,\
 	org.apache.ace.feedback.common;version=latest
 -runproperties: org.apache.felix.log.storeDebug=true,\
 	org.apache.felix.eventadmin.Timeout=0,\

Modified: ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ClientRestUtils.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ClientRestUtils.java?rev=1571710&r1=1571709&r2=1571710&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ClientRestUtils.java
(original)
+++ ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/ClientRestUtils.java
Tue Feb 25 14:31:17 2014
@@ -198,13 +198,14 @@ public class ClientRestUtils {
 
     /** Creates a new workspace. */
     public static WebResource createWorkspace(String host, Client c) {
-        WebResource r = c.resource(host.concat("/client/work"));
+        WebResource r = c.resource(host.concat("/client/work/"));
         try {
             r.post(String.class, "");
             fail("We should have been redirected to a new workspace.");
             return null; // to keep the compiler happy, it does not understand what fail()
does
         }
         catch (UniformInterfaceException e) {
+            assertEquals("Expected a valid redirect after creating a workspace", 302, e.getResponse().getStatus());
             return c.resource(e.getResponse().getLocation());
         }
     }

Modified: ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java?rev=1571710&r1=1571709&r2=1571710&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
(original)
+++ ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
Tue Feb 25 14:31:17 2014
@@ -393,6 +393,15 @@ public class RESTClientTest extends Inte
         configure("org.apache.ace.identification.property",
             "targetID", "target-test");
 
+        configure("org.apache.ace.client.workspace",
+            "repository.url", HOST.concat("/repository"),
+            "authentication.enabled", "false",
+            "user.name", "d",
+            "customer.name", "apache",
+            "store.repository.name", "shop",
+            "distribution.repository.name", "target",
+            "deployment.repository.name", "deployment");
+
         configureFactory("org.apache.ace.log.server.servlet.factory",
             "name", "auditlog",
             HttpConstants.ENDPOINT, "/auditlog",



Mime
View raw message