You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/11/16 15:18:21 UTC

[4/5] usergrid git commit: Un-ignore some tests that now appear to be working (again).

Un-ignore some tests that now appear to be working (again).


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/5c85b759
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/5c85b759
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/5c85b759

Branch: refs/heads/ignores
Commit: 5c85b7598586abe0b11e29918b09be11addec831
Parents: 59d2a71
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 16:32:55 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 16:32:55 2015 -0500

----------------------------------------------------------------------
 .../applications/ApplicationResourceIT.java     | 25 ++----------
 .../applications/queries/MatrixQueryTests.java  |  2 -
 .../rest/filters/ContentTypeResourceIT.java     |  4 --
 .../usergrid/rest/management/AdminUsersIT.java  |  8 ++--
 .../cassandra/ManagementServiceIT.java          | 41 +++++++-------------
 5 files changed, 21 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
index 317b742..cd42262 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
@@ -230,7 +230,7 @@ public class ApplicationResourceIT extends AbstractRestIT {
      * (for backwards compatibility)
      */
     @Test
-    @Ignore("this form of backwards compatibility no longer needed")
+    @Ignore("no longer relevant - this type of backwards compatibility no longer needed")
     public void jsonForAcceptsTextHtml() throws Exception {
 
         //Create the organization resource
@@ -371,22 +371,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
         assertNotNull(credentials.getClientSecret());
     }
 
-
-    @Test
-    @Ignore //This is implemented now
-    public void noAppDelete() throws IOException {
-        String orgName = clientSetup.getOrganizationName().toLowerCase();
-        String appName = clientSetup.getAppName().toLowerCase();
-
-        ApiResponse apiResponse = target().path( String.format( "/%s/%s", orgName, appName ) )
-            .queryParam( "access_token", this.getAdminToken().getAccessToken() )
-            .request()
-            .accept( MediaType.APPLICATION_JSON )
-            .delete( ApiResponse.class );
-
-        assertNotNull(apiResponse.getError());
-    }
-
     /**
      * Test for an exception when a token's TTL is set greater than the maximum
      */
@@ -591,7 +575,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
      * Retrieve an oauth authorization using invalid credentials
      */
     @Test
-    @Ignore("viewable return types are not working in embedded tomcat 7.x")
     public void authorizationCodeWithWrongCredentials() throws Exception {
         //Create form input with bogus credentials
         Form payload = new Form();
@@ -699,8 +682,8 @@ public class ApplicationResourceIT extends AbstractRestIT {
      * Retrieve an access token using HTTP Basic authentication
      */
     @Test
-    @Ignore
-    //Are we trying to generate token with token? Couldn't find enpoint that accepts token for generating token
+    @Ignore("Should fix - https://issues.apache.org/jira/browse/USERGRID-1106")
+    //Are we trying to generate token with token? Couldn't find endpoint that accepts token for generating token
     public void clientCredentialsFlowWithHeaderAuthorization() throws Exception {
         //retrieve the credentials
         Credentials orgCredentials = getAppCredentials();
@@ -783,7 +766,7 @@ public class ApplicationResourceIT extends AbstractRestIT {
      * Ensure that the Apigee Mobile Analytics config returns valid JSON
      */
     @Test
-    @Ignore
+    @Ignore("No longer relevant - Apigee internal")
     public void validateApigeeApmConfigAPP() throws IOException {
         String orgName = clientSetup.getOrganizationName().toLowerCase();
         String appName = clientSetup.getAppName().toLowerCase();

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
index de21e0a..7525d51 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
@@ -41,7 +41,6 @@ public class MatrixQueryTests extends AbstractRestIT {
      *
      * @throws Exception
      */
-    @Ignore
     @Test
     public void connectionsTest() throws Exception {
 
@@ -105,7 +104,6 @@ public class MatrixQueryTests extends AbstractRestIT {
         assertEquals(1, user3likes.getResponse().getEntityCount());
     }
 
-    @Ignore
     @Test
     public void largeRootElements() {
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
index 47afb8c..ce57c4b 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
@@ -50,12 +50,8 @@ import static org.junit.Assert.assertNotNull;
 /**
  * @author tnine
  */
-
-// @Ignore("Client login is causing tests to fail due to socket closure by grizzly.  Need to re-enable once we're not
-// using grizzly to test")
 public class ContentTypeResourceIT extends AbstractRestIT {
 
-
     /**
      * Creates a simple entity of type game. Does not set the content type. The type should be set to json to match the
      * body

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
index 9864e65..3aed997 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
@@ -398,7 +398,7 @@ public class AdminUsersIT extends AbstractRestIT {
         assertFalse( inbox.isEmpty() );
     }
 
-    @Ignore("Test is broken due to viewables not being properly returned in the embedded tomcat")
+    @Ignore("Build problems - Test is broken due to viewables not being properly returned in the embedded tomcat")
     @Test
     public void checkFormPasswordReset() throws Exception {
 
@@ -434,8 +434,8 @@ public class AdminUsersIT extends AbstractRestIT {
 
         assertTrue( html.contains( "invalid token" ) );
     }
-//
-//     TODO: will work once resetpw viewables work
+
+//    // TODO: will work once resetpw viewables work
 //    @Test
 //    @Ignore( "causes problems in build" )
 //    public void passwordResetIncorrectUserName() throws Exception {
@@ -462,8 +462,6 @@ public class AdminUsersIT extends AbstractRestIT {
 //
 //        assertTrue( html.contains( "password set" ) );
 //    }
-//
-//
 
 
     /**

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
index f0c0c10..ad2ce66 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
@@ -17,25 +17,11 @@
 package org.apache.usergrid.management.cassandra;
 
 
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.usergrid.NewOrgAppAdminRule;
 import org.apache.usergrid.ServiceITSetup;
 import org.apache.usergrid.ServiceITSetupImpl;
-import org.apache.usergrid.cassandra.SpringResource;
 import org.apache.usergrid.cassandra.ClearShiroSubject;
-
+import org.apache.usergrid.cassandra.SpringResource;
 import org.apache.usergrid.count.SimpleBatcher;
 import org.apache.usergrid.management.OrganizationInfo;
 import org.apache.usergrid.management.UserInfo;
@@ -43,7 +29,6 @@ import org.apache.usergrid.persistence.CredentialsInfo;
 import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.entities.User;
-import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
 import org.apache.usergrid.security.AuthPrincipalType;
 import org.apache.usergrid.security.crypto.command.Md5HashCommand;
 import org.apache.usergrid.security.crypto.command.Sha1HashCommand;
@@ -51,19 +36,22 @@ import org.apache.usergrid.security.tokens.TokenCategory;
 import org.apache.usergrid.security.tokens.exceptions.InvalidTokenException;
 import org.apache.usergrid.utils.JsonUtils;
 import org.apache.usergrid.utils.UUIDUtils;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 
 import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
-import static org.apache.usergrid.TestHelper.newUUIDString;
-import static org.apache.usergrid.TestHelper.uniqueApp;
-import static org.apache.usergrid.TestHelper.uniqueEmail;
-import static org.apache.usergrid.TestHelper.uniqueOrg;
-import static org.apache.usergrid.TestHelper.uniqueUsername;
+import static org.apache.usergrid.TestHelper.*;
 import static org.apache.usergrid.persistence.Schema.DICTIONARY_CREDENTIALS;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 /**
  * @author zznate
@@ -462,7 +450,6 @@ public class ManagementServiceIT {
     }
 
 
-    @Ignore("Why is this ignored?")
     public void superUserGetOrganizationsPage() throws Exception {
         int beforeSize = setup.getMgmtSvc().getOrganizations().size() - 1;
         // create 15 orgs