You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/12/03 23:29:25 UTC
[18/22] incubator-usergrid git commit: ignore test for now
ignore test for now
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5c2235fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5c2235fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5c2235fc
Branch: refs/heads/two-dot-o
Commit: 5c2235fcfe4f2b8cdbebadd3d36f84c5f534bf52
Parents: d28af0d
Author: Shawn Feldman <sf...@apache.org>
Authored: Tue Dec 2 15:21:38 2014 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Tue Dec 2 15:21:38 2014 -0700
----------------------------------------------------------------------
.../apache/usergrid/rest/IndexResourceIT.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5c2235fc/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
index bc33baa..9bf0813 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
@@ -21,6 +21,7 @@
package org.apache.usergrid.rest;
import com.fasterxml.jackson.databind.JsonNode;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
@@ -32,9 +33,10 @@ import java.util.Map;
import java.util.UUID;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
/**
- * Classy class class.
+ * test index creation
*/
public class IndexResourceIT extends AbstractRestIT {
@@ -48,6 +50,7 @@ public class IndexResourceIT extends AbstractRestIT {
}
+ @Ignore( "will finish when tests are working from rest" )
@Test
public void TestAddIndex() throws Exception{
String superToken = superAdminToken();
@@ -59,10 +62,16 @@ public class IndexResourceIT extends AbstractRestIT {
UUID appId = this.context.getAppUuid();
// change the password as admin. The old password isn't required
- JsonNode node = mapper.readTree( resource().path( "/index/"+appId ).queryParam( "access_token", superToken )
- .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
- .post( String.class, data ));
-
+ JsonNode node = null;
+ try {
+ node = mapper.readTree(resource().path("/system/index/" + appId)
+ .queryParam("access_token", superToken)
+ .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON_TYPE)
+ .post(String.class, data));
+ }catch (Exception e){
+ LOG.error("failed", e);
+ fail(e.toString());
+ }
assertNull( getError( node ) );
refreshIndex("test-organization", "test-app");