You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/03/04 18:50:20 UTC

[1/6] incubator-usergrid git commit: [USERGRID-422] Created rest test for the issue. Added system, database, and setup resources for the rest test framework (RTF).

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o 39c732b6a -> c1f5b7842


[USERGRID-422] Created rest test for the issue.
Added system,database,and setup resources for the rest test framework (RTF).


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

Branch: refs/heads/two-dot-o
Commit: efb6e72dec2e68aaa3c839c22a1d819c619e912f
Parents: 567db37
Author: grey <gr...@apigee.com>
Authored: Thu Feb 26 13:23:13 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Thu Feb 26 13:23:13 2015 -0800

----------------------------------------------------------------------
 .../apache/usergrid/rest/SystemResourceIT.java  | 41 ++++++++++++++++++++
 .../rest/test/resource2point0/RestClient.java   |  4 ++
 .../endpoints/DatabaseResource.java             | 39 +++++++++++++++++++
 .../endpoints/SetupResource.java                | 39 +++++++++++++++++++
 .../endpoints/SystemResource.java               | 36 +++++++++++++++++
 5 files changed, 159 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/efb6e72d/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
new file mode 100644
index 0000000..7b13a19
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest;
+
+
+import org.junit.Test;
+
+import org.apache.usergrid.rest.test.resource2point0.AbstractRestIT;
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+
+import static org.junit.Assert.assertNotNull;
+
+
+/**
+ * Tests endpoints that use /system/*
+ */
+public class SystemResourceIT extends AbstractRestIT {
+
+    @Test
+    public void testSystemDatabaseAlreadyRun() {
+        Entity ent = clientSetup.getRestClient().system().database().setup().get();
+
+        assertNotNull(ent);
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/efb6e72d/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
index ebd1e35..cf2d1f6 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
@@ -16,6 +16,7 @@
  */
 package org.apache.usergrid.rest.test.resource2point0;
 
+import org.apache.usergrid.rest.test.resource2point0.endpoints.SystemResource;
 import org.apache.usergrid.rest.test.resource2point0.endpoints.TokenResource;
 import org.apache.usergrid.rest.test.resource2point0.endpoints.mgmt.ManagementResource;
 import org.apache.usergrid.rest.test.resource2point0.endpoints.OrganizationResource;
@@ -72,6 +73,9 @@ public class RestClient implements UrlResource {
         return context;
     }
 
+    public SystemResource system() {
+        return new SystemResource(context, this);
+    }
 
     /**
      * Get the management resource

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/efb6e72d/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
new file mode 100644
index 0000000..7ed31ac
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest.test.resource2point0.endpoints;
+
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.usergrid.persistence.cassandra.Setup;
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
+
+
+/**
+ * Contains methods pertaining to system/database/*
+ */
+public class DatabaseResource extends NamedResource {
+
+    public DatabaseResource( final ClientContext context, final UrlResource parent ) {
+        super( "database", context, parent );
+    }
+
+    public SetupResource setup(){
+        return new SetupResource (context, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/efb6e72d/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
new file mode 100644
index 0000000..34d1848
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest.test.resource2point0.endpoints;
+
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
+
+
+/**
+ * Functions as the endpoint for all resources that hit /system/ * /setup
+ */
+public class SetupResource extends NamedResource {
+
+    public SetupResource( final ClientContext context, final UrlResource parent ) {
+        super("setup",context,parent);
+    }
+
+    public Entity get(){
+        return getResource(true).type( MediaType.APPLICATION_JSON_TYPE ).accept( MediaType.APPLICATION_JSON )
+                                .get( Entity.class );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/efb6e72d/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
new file mode 100644
index 0000000..e2bff1f
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.rest.test.resource2point0.endpoints;
+
+
+import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
+
+
+/**
+ * Handles making rest calls to system resources.
+ */
+public class SystemResource extends NamedResource {
+
+    public SystemResource(final ClientContext context, final UrlResource parent ) {
+        super( "system",context, parent );
+    }
+
+    public DatabaseResource database() {
+        return new DatabaseResource(context, this);
+    }
+}


[6/6] incubator-usergrid git commit: Merge branch 'pr/172' into two-dot-o

Posted by sf...@apache.org.
Merge branch 'pr/172' into two-dot-o


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

Branch: refs/heads/two-dot-o
Commit: c1f5b78429b1017bf7bc685c7c09f5c762ab7027
Parents: 39c732b 4588a01
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Mar 4 10:47:54 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Mar 4 10:47:54 2015 -0700

----------------------------------------------------------------------
 .../apache/usergrid/rest/SystemResourceIT.java  | 60 ++++++++++++++++++++
 .../rest/test/resource2point0/RestClient.java   |  5 ++
 .../endpoints/DatabaseResource.java             | 39 +++++++++++++
 .../endpoints/SetupResource.java                | 46 +++++++++++++++
 .../endpoints/SystemResource.java               | 36 ++++++++++++
 .../cassandra/ManagementServiceImpl.java        |  7 ++-
 6 files changed, 192 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[4/6] incubator-usergrid git commit: [USERGRID-422] Added test that proves issue.

Posted by sf...@apache.org.
[USERGRID-422] Added test that proves issue.


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

Branch: refs/heads/two-dot-o
Commit: dcdb3930019cfc2bda45e21dd0b264374f6d5923
Parents: 3004a45
Author: grey <gr...@apigee.com>
Authored: Tue Mar 3 13:02:03 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Tue Mar 3 13:02:03 2015 -0800

----------------------------------------------------------------------
 .../apache/usergrid/rest/SystemResourceIT.java  | 23 ++++++++++++++++++--
 .../endpoints/SetupResource.java                | 11 ++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/dcdb3930/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
index 7b13a19..5695143 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
@@ -21,6 +21,10 @@ import org.junit.Test;
 
 import org.apache.usergrid.rest.test.resource2point0.AbstractRestIT;
 import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+import org.apache.usergrid.rest.test.resource2point0.model.QueryParameters;
+import org.apache.usergrid.rest.test.resource2point0.model.Token;
+
+import com.sun.jersey.api.client.UniformInterfaceException;
 
 import static org.junit.Assert.assertNotNull;
 
@@ -32,9 +36,24 @@ public class SystemResourceIT extends AbstractRestIT {
 
     @Test
     public void testSystemDatabaseAlreadyRun() {
-        Entity ent = clientSetup.getRestClient().system().database().setup().get();
+        //try {
+        QueryParameters queryParameters = new QueryParameters();
+        queryParameters.addParam( "access_token",clientSetup.getSuperuserToken().getAccessToken() );
+        Entity result = clientSetup.getRestClient().system().database().setup().get(queryParameters);
+//        }catch(UniformInterfaceException uie) {
+//            asser
+//        }
+//
+        assertNotNull(result);
+        assertNotNull( "ok" ,(String)result.get( "status" ) );
+
+        result = clientSetup.getRestClient().system().database().setup().get(queryParameters);
+
+        assertNotNull( result );
+        assertNotNull( "ok" ,(String)result.get( "status" ) );
+
+
 
-        assertNotNull(ent);
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/dcdb3930/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
index 34d1848..1639ce5 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SetupResource.java
@@ -20,8 +20,12 @@ package org.apache.usergrid.rest.test.resource2point0.endpoints;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+import org.apache.usergrid.rest.test.resource2point0.model.QueryParameters;
+import org.apache.usergrid.rest.test.resource2point0.model.Token;
 import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
 
+import com.sun.jersey.api.client.WebResource;
+
 
 /**
  * Functions as the endpoint for all resources that hit /system/ * /setup
@@ -32,8 +36,11 @@ public class SetupResource extends NamedResource {
         super("setup",context,parent);
     }
 
-    public Entity get(){
-        return getResource(true).type( MediaType.APPLICATION_JSON_TYPE ).accept( MediaType.APPLICATION_JSON )
+    public Entity get(QueryParameters queryParameters){
+        WebResource resource = getResource();
+        resource = addParametersToResource( resource, queryParameters );
+
+        return resource.type( MediaType.APPLICATION_JSON_TYPE ).accept( MediaType.APPLICATION_JSON )
                                 .get( Entity.class );
     }
 }


[2/6] incubator-usergrid git commit: Merge branch 'two-dot-o' of https://github.com/apache/incubator-usergrid into USERGRID-422

Posted by sf...@apache.org.
Merge branch 'two-dot-o' of https://github.com/apache/incubator-usergrid into USERGRID-422

# By Shawn Feldman (15) and others
# Via Shawn Feldman (9) and others
* 'two-dot-o' of https://github.com/apache/incubator-usergrid: (24 commits)
  This fixes many tests in ApplicationResourceIT.  This is a technically a merge but Usergrid 333 was already merged into two-dot-o.
  Removing unnecessary test class and commented out dependencies.
  Exclude Codehaus Jackson JAX-RS dependency, plus some better logging & test improvements.
  compilation
  fix compilation
  indexbuffer: update method names
  index message comments
  undo change
  change config
  add batching
  Add futures to batch and refresh
  Add batch of batches
  add batches of batches
  removing future, moving around some initialization code
  add comments
  add blocking queue
  Adding metrics to cp
  adding index buffer
  Added test for user feeds and started testCaseSensitivity test.
  Fixed another test that uses the superuser token, and added a different endpoint to facilitate using the superuser token or the default endpoint.
  ...


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

Branch: refs/heads/two-dot-o
Commit: 19e73d66d3df03bcfab0cc42f3bdb6b2c075b571
Parents: efb6e72 67cb719
Author: grey <gr...@apigee.com>
Authored: Tue Mar 3 11:44:46 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Tue Mar 3 11:44:46 2015 -0800

----------------------------------------------------------------------
 .../batch/service/JobSchedulerService.java      |    2 +-
 .../corepersistence/CpEntityManager.java        |    4 +-
 .../corepersistence/CpRelationManager.java      |    6 +-
 .../results/FilteringLoader.java                |   42 +-
 .../apache/usergrid/metrics/MetricsFactory.java |  112 --
 .../main/resources/usergrid-core-context.xml    |    4 +-
 .../usergrid/persistence/CollectionIT.java      |    2 +-
 stack/corepersistence/common/pom.xml            |   12 +
 .../persistence/core/future/BetterFuture.java   |   43 +
 .../persistence/core/guice/CommonModule.java    |    6 +-
 .../core/metrics/MetricsFactory.java            |   34 +
 .../core/metrics/MetricsFactoryImpl.java        |  113 ++
 .../persistence/core/metrics/MetricsFig.java    |   33 +
 stack/corepersistence/pom.xml                   |    1 +
 .../persistence/index/EntityIndexBatch.java     |   32 +-
 .../persistence/index/IndexBatchBuffer.java     |   36 +
 .../persistence/index/IndexBufferConsumer.java  |   26 +
 .../persistence/index/IndexBufferProducer.java  |   36 +
 .../usergrid/persistence/index/IndexFig.java    |   45 +-
 .../index/IndexOperationMessage.java            |   64 +
 .../persistence/index/guice/IndexModule.java    |   17 +-
 .../index/impl/EsEntityIndexBatchImpl.java      |  130 +-
 .../index/impl/EsEntityIndexImpl.java           |   16 +-
 .../index/impl/EsIndexBufferConsumerImpl.java   |  183 +++
 .../index/impl/EsIndexBufferProducerImpl.java   |   57 +
 .../index/impl/CorePerformanceIT.java           |   44 +-
 .../impl/EntityConnectionIndexImplTest.java     |    7 +-
 .../persistence/index/impl/EntityIndexTest.java |  106 +-
 stack/rest/pom.xml                              |   37 +-
 .../org/apache/usergrid/rest/SimplestTest.java  |   35 -
 .../collection/BrowserCompatibilityTest.java    |    5 +-
 .../collection/CollectionsResourceIT.java       |    3 +-
 .../applications/queries/GeoPagingTest.java     |   44 +-
 .../usergrid/rest/management/AdminUsersIT.java  | 1342 +++++++++---------
 .../rest/management/ImportResourceIT.java       |    1 -
 .../rest/test/resource2point0/ClientSetup.java  |   19 +-
 .../rest/test/resource2point0/RestClient.java   |   11 +
 .../endpoints/CollectionEndpoint.java           |  155 +-
 .../endpoints/mgmt/FeedResource.java            |   48 +
 .../endpoints/mgmt/OrgResource.java             |   81 +-
 .../endpoints/mgmt/PasswordResource.java        |   61 +
 .../endpoints/mgmt/UserResource.java            |   55 +
 .../endpoints/mgmt/UsersResource.java           |    6 +-
 .../test/resource2point0/model/Credentials.java |    4 +-
 .../rest/test/resource2point0/model/Entity.java |    6 -
 .../resources/usergrid-custom-test.properties   |   12 +
 stack/services/pom.xml                          |    6 +
 .../usergrid/services/guice/ServiceModule.java  |    2 -
 .../notifications/NotificationsService.java     |    4 +-
 .../services/notifications/QueueJob.java        |    6 +-
 .../services/notifications/QueueListener.java   |    6 +-
 .../impl/ApplicationQueueManagerImpl.java       |    2 +-
 .../services/queues/ImportQueueListener.java    |    7 +-
 .../usergrid/services/queues/QueueListener.java |    7 +-
 .../resources/usergrid-services-context.xml     |    1 -
 .../apns/NotificationsServiceIT.java            |    2 +-
 .../gcm/NotificationsServiceIT.java             |    4 +-
 stack/test-utils/pom.xml                        |   11 -
 58 files changed, 2020 insertions(+), 1176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/19e73d66/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
----------------------------------------------------------------------


[3/6] incubator-usergrid git commit: Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-422

Posted by sf...@apache.org.
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-422

# By grey (12) and Rod Simpson (1)
# Via grey (3) and Rod Simpson (1)
* 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid:
  Revert "Merge remote-tracking branch 'gerey/USERGRID-280' into apache_usergrid/two-dot-o"
  Removed test properties change, and some formatting. Added test for properties and additionally added to management feed test.
  Added comments to tests that didn't have any.
  Added some more methods for users and organizations. Added comments on resetpw viewables not working in test environment. Cleanup of imports. Added fixes to remaining tests
  Added two tests, one ignored due to issue detailed above the test, and another for checking the passwords. Added a resetpw resource for rest test framework.
  Removed unused catalina rest tomcat.
  Added reactivate endpoint to users in rest test framework. Added test to prove that reactivate endpoint still works.
  [USERGRID-280]Added a management user put endpoint to the rest test framework. Created new ticket and added a test for that ticket .
  [USERGRID-280] Added testTestUserNeedsNoConfirmation, this test currently does not pass but due to test account issues
  Added testSystemAdmin needs no confirmation test
  Added fix for unconfirmedAdminUsersTest
  Added additional admin confirmation tests and fixes for the token resource.
  Added testProperties RTF files.

Conflicts:
	stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java


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

Branch: refs/heads/two-dot-o
Commit: 3004a452079c2d174a136edb15dacfa926e8043b
Parents: 19e73d6 ebf6e13
Author: grey <gr...@apigee.com>
Authored: Tue Mar 3 12:40:27 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Tue Mar 3 12:40:27 2015 -0800

----------------------------------------------------------------------
 stack/rest/catalina_base/bin/setenv.sh          |    8 -
 stack/rest/catalina_base/conf/server.xml        |  144 -
 stack/rest/catalina_base/conf/tomcat-users.xml  |   36 -
 stack/rest/catalina_base/conf/web.xml           | 4614 ------------------
 .../lib/usergrid-deployment.properties          |  113 -
 .../webapps/host-manager/META-INF/context.xml   |   27 -
 .../webapps/host-manager/WEB-INF/jsp/401.jsp    |   70 -
 .../webapps/host-manager/WEB-INF/jsp/403.jsp    |   84 -
 .../webapps/host-manager/WEB-INF/jsp/404.jsp    |   61 -
 .../webapps/host-manager/WEB-INF/web.xml        |  144 -
 .../webapps/host-manager/images/add.gif         |  Bin 1037 -> 0 bytes
 .../webapps/host-manager/images/asf-logo.gif    |  Bin 7279 -> 0 bytes
 .../webapps/host-manager/images/code.gif        |  Bin 394 -> 0 bytes
 .../webapps/host-manager/images/design.gif      |  Bin 608 -> 0 bytes
 .../webapps/host-manager/images/docs.gif        |  Bin 261 -> 0 bytes
 .../webapps/host-manager/images/fix.gif         |  Bin 345 -> 0 bytes
 .../webapps/host-manager/images/tomcat.gif      |  Bin 1934 -> 0 bytes
 .../webapps/host-manager/images/update.gif      |  Bin 627 -> 0 bytes
 .../webapps/host-manager/images/void.gif        |  Bin 43 -> 0 bytes
 .../webapps/host-manager/index.jsp              |   18 -
 .../webapps/host-manager/manager.xml            |   26 -
 .../webapps/manager/META-INF/context.xml        |   27 -
 .../webapps/manager/WEB-INF/jsp/401.jsp         |   79 -
 .../webapps/manager/WEB-INF/jsp/403.jsp         |   94 -
 .../webapps/manager/WEB-INF/jsp/404.jsp         |   62 -
 .../manager/WEB-INF/jsp/sessionDetail.jsp       |  197 -
 .../manager/WEB-INF/jsp/sessionsList.jsp        |  172 -
 .../webapps/manager/WEB-INF/web.xml             |  209 -
 .../webapps/manager/images/add.gif              |  Bin 1037 -> 0 bytes
 .../webapps/manager/images/asf-logo.gif         |  Bin 7279 -> 0 bytes
 .../webapps/manager/images/code.gif             |  Bin 394 -> 0 bytes
 .../webapps/manager/images/design.gif           |  Bin 608 -> 0 bytes
 .../webapps/manager/images/docs.gif             |  Bin 261 -> 0 bytes
 .../webapps/manager/images/fix.gif              |  Bin 345 -> 0 bytes
 .../webapps/manager/images/tomcat.gif           |  Bin 2066 -> 0 bytes
 .../webapps/manager/images/update.gif           |  Bin 627 -> 0 bytes
 .../webapps/manager/images/void.gif             |  Bin 43 -> 0 bytes
 .../catalina_base/webapps/manager/index.jsp     |   18 -
 .../catalina_base/webapps/manager/status.xsd    |   84 -
 .../catalina_base/webapps/manager/xform.xsl     |  125 -
 stack/rest/catalina_base/webapps/portal         |    1 -
 .../manager/org/apache/jsp/index_jsp.java       |   83 -
 .../usergrid/rest/test/PropertiesResource.java  |    2 +-
 .../usergrid/rest/management/AdminUsersIT.java  |  967 ++--
 .../rest/test/resource2point0/ClientSetup.java  |   14 +-
 .../rest/test/resource2point0/RestClient.java   |    3 +
 .../resource2point0/TestPropertiesResource.java |   47 +
 .../endpoints/mgmt/ConfirmResource.java         |   46 +
 .../endpoints/mgmt/OrgResource.java             |   12 +-
 .../endpoints/mgmt/ReactivateResource.java      |   46 +
 .../endpoints/mgmt/ResetResource.java           |   42 +
 .../endpoints/mgmt/TokenResource.java           |    4 +-
 .../endpoints/mgmt/UserResource.java            |   25 +
 .../endpoints/mgmt/UsersResource.java           |    7 +
 .../resources/usergrid-custom-test.properties   |    6 -
 55 files changed, 655 insertions(+), 7062 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3004a452/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
----------------------------------------------------------------------
diff --cc stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
index 5394252,f697509..ed7057f
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
@@@ -75,10 -74,9 +75,13 @@@ public class RestClient implements UrlR
          return context;
      }
  
 +    public SystemResource system() {
 +        return new SystemResource(context, this);
 +    }
 +
+     public TestPropertiesResource testPropertiesResource() {
+         return new TestPropertiesResource( context, this );
+     }
      /**
       * Get the management resource
       */


[5/6] incubator-usergrid git commit: [USERGRID-418] Add a catch to ensure that if the database runs with the application already existing it returns an ok. Also adds a logger debug telling people what happens if they have the debug flag.

Posted by sf...@apache.org.
[USERGRID-418] Add a catch to ensure that if the database runs with the application already existing it returns an ok.
Also adds a logger debug telling people what happens if they have the debug flag.


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

Branch: refs/heads/two-dot-o
Commit: 4588a01eba10e9868f2651de24469ed0b9672125
Parents: dcdb393
Author: grey <gr...@apigee.com>
Authored: Tue Mar 3 13:17:14 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Tue Mar 3 13:17:14 2015 -0800

----------------------------------------------------------------------
 .../usergrid/management/cassandra/ManagementServiceImpl.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4588a01e/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index c44a712..35ed091 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -57,6 +57,7 @@ import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.exceptions.ApplicationAlreadyExistsException;
 import org.apache.usergrid.persistence.index.query.Identifier;
 import org.apache.usergrid.persistence.PagingResultsIterator;
 import org.apache.usergrid.persistence.Results;
@@ -310,7 +311,11 @@ public class ManagementServiceImpl implements ManagementService {
             }
 
             if ( !getApplicationsForOrganization( organization.getUuid() ).containsValue( test_app_name ) ) {
-                createApplication( organization.getUuid(), test_app_name );
+                try {
+                    createApplication( organization.getUuid(), test_app_name );
+                }catch(ApplicationAlreadyExistsException aaee){
+                    logger.debug("The database setup already found an existing application");
+                }
             }
         }
         else {