You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/05/28 13:40:09 UTC

[sling-org-apache-sling-resourceresolver] branch feature/SLING-10432 created (now cbfac0a)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch feature/SLING-10432
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git.


      at cbfac0a  SLING-10432 - regression: incorrect mapping result for aliased pages

This branch includes the following new commits:

     new cbfac0a  SLING-10432 - regression: incorrect mapping result for aliased pages

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-resourceresolver] 01/01: SLING-10432 - regression: incorrect mapping result for aliased pages

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-10432
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git

commit cbfac0aeeb66aa4f3d1442976d7177e02bc141a3
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri May 28 15:39:31 2021 +0200

    SLING-10432 - regression: incorrect mapping result for aliased pages
    
    Add a failing test(ignored for now)
---
 .../impl/mapping/ResourceMapperImplTest.java             | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
index a990eb2..9ae3c4f 100644
--- a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
+++ b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
@@ -47,6 +47,7 @@ import org.apache.sling.spi.resource.provider.ResourceProvider;
 import org.apache.sling.testing.mock.osgi.junit.OsgiContext;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -327,6 +328,21 @@ public class ResourceMapperImplTest {
             .verify(resolver, req);
     }
 
+    /**
+     * Validates that the mapping for a non-existing resource that is the target of an alias
+     * is the alias itself
+     */
+    @Test
+    @Ignore("SLING-10432")
+    public void mapAliasTarget() {
+        ExpectedMappings.nonExistingResource("/alias-value")
+            .singleMapping("/alias-value")
+            .singleMappingWithRequest("/app/alias-value")
+            .allMappings("/alias-value")
+            .allMappingsWithRequest("/app/alias-value")
+            .verify(resolver, req);
+    }
+
     static class ExpectedMappings {
 
         public static ExpectedMappings existingResource(String path) {