Return-Path: Delivered-To: apmail-incubator-sling-commits-archive@minotaur.apache.org Received: (qmail 52112 invoked from network); 19 Mar 2009 20:53:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 20:53:47 -0000 Received: (qmail 55629 invoked by uid 500); 19 Mar 2009 20:53:47 -0000 Delivered-To: apmail-incubator-sling-commits-archive@incubator.apache.org Received: (qmail 55602 invoked by uid 500); 19 Mar 2009 20:53:47 -0000 Mailing-List: contact sling-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sling-dev@incubator.apache.org Delivered-To: mailing list sling-commits@incubator.apache.org Received: (qmail 55593 invoked by uid 99); 19 Mar 2009 20:53:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 13:53:47 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 20:53:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3C76B238896B; Thu, 19 Mar 2009 20:53:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r756191 [2/2] - in /incubator/sling/trunk: bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/ Date: Thu, 19 Mar 2009 20:53:25 -0000 To: sling-commits@incubator.apache.org From: jvazquez@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090319205326.3C76B238896B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/RemoveAuthorizablesTest.java URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/RemoveAuthorizablesTest.java?rev=756191&r1=756190&r2=756191&view=diff ============================================================================== --- incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/RemoveAuthorizablesTest.java (original) +++ incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/RemoveAuthorizablesTest.java Thu Mar 19 20:53:24 2009 @@ -39,9 +39,8 @@ String getUrl = HTTP_BASE_URL + "/system/userManager/user/" + userId + ".json"; assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + userId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + userId + ".delete.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "deleteAuthorizable")); assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null); getUrl = HTTP_BASE_URL + "/system/userManager/user/" + userId + ".json"; @@ -56,9 +55,8 @@ String getUrl = HTTP_BASE_URL + "/system/userManager/group/" + groupId + ".json"; assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data - String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + groupId; + String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + groupId + ".delete.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "deleteAuthorizable")); assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null); getUrl = HTTP_BASE_URL + "/system/userManager/group/" + groupId + ".json"; @@ -77,9 +75,8 @@ getUrl = HTTP_BASE_URL + "/system/userManager/group/" + groupId + ".json"; assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data - String postUrl = HTTP_BASE_URL + "/system/userManager"; + String postUrl = HTTP_BASE_URL + "/system/userManager.delete.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "deleteAuthorizable")); postParams.add(new NameValuePair(":applyTo", "group/" + groupId)); postParams.add(new NameValuePair(":applyTo", "user/" + userId)); assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null); Modified: incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateGroupTest.java URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateGroupTest.java?rev=756191&r1=756190&r2=756191&view=diff ============================================================================== --- incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateGroupTest.java (original) +++ incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateGroupTest.java Thu Mar 19 20:53:24 2009 @@ -40,9 +40,8 @@ protected void tearDown() throws Exception { if (testGroupId != null) { //remove the test user if it exists. - String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId; + String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId + ".delete.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "deleteAuthorizable")); assertAuthenticatedAdminPostStatus(postUrl, HttpServletResponse.SC_OK, postParams, null); } @@ -52,10 +51,9 @@ public void testUpdateGroup() throws IOException, JSONException { testGroupId = createTestGroup(); - String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId; + String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId + ".update.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "updateAuthorizable")); postParams.add(new NameValuePair("displayName", "My Updated Test Group")); postParams.add(new NameValuePair("url", "http://www.apache.org/updated")); @@ -70,17 +68,15 @@ JSONObject jsonObj = new JSONObject(json); assertEquals("My Updated Test Group", jsonObj.getString("displayName")); assertEquals("http://www.apache.org/updated", jsonObj.getString("url")); - assertFalse(jsonObj.has(":operation")); } public void testUpdateGroupMembers() throws IOException, JSONException { testGroupId = createTestGroup(); - String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId; + String postUrl = HTTP_BASE_URL + "/system/userManager/group/" + testGroupId + ".update.html"; //TODO: verify this works.... List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "updateAuthorizable")); postParams.add(new NameValuePair(":member", "../user/testUser")); postParams.add(new NameValuePair(":member@Delete", "testGroup")); Modified: incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateUserTest.java URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateUserTest.java?rev=756191&r1=756190&r2=756191&view=diff ============================================================================== --- incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateUserTest.java (original) +++ incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateUserTest.java Thu Mar 19 20:53:24 2009 @@ -40,9 +40,8 @@ protected void tearDown() throws Exception { if (testUserId != null) { //remove the test user if it exists. - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId + ".delete.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "updateAuthorizable")); assertAuthenticatedAdminPostStatus(postUrl, HttpServletResponse.SC_OK, postParams, null); } @@ -52,10 +51,9 @@ public void testUpdateUser() throws IOException, JSONException { testUserId = createTestUser(); - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId + ".update.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "updateAuthorizable")); postParams.add(new NameValuePair("displayName", "My Updated Test User")); postParams.add(new NameValuePair("url", "http://www.apache.org/updated")); Credentials creds = new UsernamePasswordCredentials(testUserId, "testPwd"); @@ -69,16 +67,14 @@ JSONObject jsonObj = new JSONObject(json); assertEquals("My Updated Test User", jsonObj.getString("displayName")); assertEquals("http://www.apache.org/updated", jsonObj.getString("url")); - assertFalse(jsonObj.has(":operation")); } public void testChangeUserPassword() throws IOException { testUserId = createTestUser(); - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId + ".changePassword.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "changePassword")); postParams.add(new NameValuePair("oldPwd", "testPwd")); postParams.add(new NameValuePair("newPwd", "testNewPwd")); postParams.add(new NameValuePair("newPwdConfirm", "testNewPwd")); @@ -90,10 +86,9 @@ public void testChangeUserPasswordWrongOldPwd() throws IOException { testUserId = createTestUser(); - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId + ".changePassword.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "changePassword")); postParams.add(new NameValuePair("oldPwd", "wrongTestPwd")); postParams.add(new NameValuePair("newPwd", "testNewPwd")); postParams.add(new NameValuePair("newPwdConfirm", "testNewPwd")); @@ -106,10 +101,9 @@ public void testChangeUserPasswordWrongConfirmPwd() throws IOException { testUserId = createTestUser(); - String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId; + String postUrl = HTTP_BASE_URL + "/system/userManager/user/" + testUserId + ".changePassword.html"; List postParams = new ArrayList(); - postParams.add(new NameValuePair(":operation", "changePassword")); postParams.add(new NameValuePair("oldPwd", "testPwd")); postParams.add(new NameValuePair("newPwd", "testNewPwd")); postParams.add(new NameValuePair("newPwdConfirm", "wrongTestNewPwd"));