You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2018/05/03 16:04:25 UTC
[sling-org-apache-sling-launchpad-integration-tests] branch master
updated: SLING-7647 - use /ANON_CAN_READ instead of /content as that path
has a resource resolver mapping that gets in the way
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-integration-tests.git
The following commit(s) were added to refs/heads/master by this push:
new 2e1a58a SLING-7647 - use /ANON_CAN_READ instead of /content as that path has a resource resolver mapping that gets in the way
2e1a58a is described below
commit 2e1a58a477a9e913a216f248a07f8556b3c967cc
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu May 3 18:04:14 2018 +0200
SLING-7647 - use /ANON_CAN_READ instead of /content as that path has a resource resolver mapping that gets in the way
---
.../webapp/integrationtest/PropertyRenderingTest.java | 2 +-
.../webapp/integrationtest/login/AnonymousAccessTest.java | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
index 9bb238c..ae2a134 100644
--- a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
+++ b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/PropertyRenderingTest.java
@@ -52,7 +52,7 @@ public class PropertyRenderingTest extends RenderingTestBase {
slingResourceType = getClass().getName();
// create the test node, under a path that's specific to this class to allow collisions
- final String url = HTTP_BASE_URL + "/content/" + getClass().getSimpleName() + "/" + System.currentTimeMillis() + SlingPostConstants.DEFAULT_CREATE_SUFFIX;
+ final String url = HTTP_BASE_URL + "/ANON_CAN_READ/" + getClass().getSimpleName() + "/" + System.currentTimeMillis() + SlingPostConstants.DEFAULT_CREATE_SUFFIX;
NameValuePairList list = new NameValuePairList();
list.add("sling:resourceType", slingResourceType);
diff --git a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AnonymousAccessTest.java b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AnonymousAccessTest.java
index fb06356..88a6f9a 100644
--- a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AnonymousAccessTest.java
+++ b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AnonymousAccessTest.java
@@ -45,7 +45,7 @@ public class AnonymousAccessTest {
@Parameterized.Parameters(name="{0}")
public static Object[] data() {
final Object [] result = new Object[] {
- new Object[] { "/content", true },
+ new Object[] { "/ANON_CAN_READ", true },
new Object[] { "", false }
};
return result;
@@ -64,11 +64,15 @@ public class AnonymousAccessTest {
H.setUp();
// create test node under a unique path
- final String url = H.HTTP_BASE_URL + basePath + "/" + getClass().getSimpleName() + "/" + System.currentTimeMillis() + SlingPostConstants.DEFAULT_CREATE_SUFFIX;
- testText = "Test text " + UUID.randomUUID();
+ final String id = UUID.randomUUID().toString();
+ final String url = H.HTTP_BASE_URL + basePath + "/" + getClass().getSimpleName() + "/" + id + SlingPostConstants.DEFAULT_CREATE_SUFFIX;
+ testText = "Test text " + id;
final NameValuePairList list = new NameValuePairList();
list.add("text", testText);
displayUrl = H.getTestClient().createNode(url, list, null, true);
+ assertTrue(
+ "Expecting base path (" + basePath + ") in test node URL (" + displayUrl + ") for POST URL " + url,
+ displayUrl.contains(basePath));
}
@After
--
To stop receiving notification emails like this one, please contact
bdelacretaz@apache.org.