This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
The following commit(s) were added to refs/heads/master by this push:
new 0717f5b SLING-9672 - Expose vanity paths from
ResourceMapper.getAllMappings()
0717f5b is described below
commit 0717f5b81486d3990c8963e10d2c0ab4895a52db
Author: Robert Munteanu <[email protected]>
AuthorDate: Tue Aug 18 14:09:11 2020 +0200
SLING-9672 - Expose vanity paths from ResourceMapper.getAllMappings()
Add ignored test.
---
.../impl/mapping/ResourceMapperImplTest.java | 12 ++++++++++++
1 file changed, 12 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 e9401fd..5754143 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
@@ -114,6 +114,7 @@ public class ResourceMapperImplTest {
resourceProvider.putResource("/parent", PROP_ALIAS, "alias-parent");
// parent has alias
resourceProvider.putResource("/parent/child", PROP_ALIAS,
"alias-child"); // child has alias
resourceProvider.putResource("/parent/child-multiple", PROP_ALIAS,
"alias-child-1", "alias-child-2"); // child has multiple alias
+ resourceProvider.putResource("/vain", "sling:vanityPath", "/vanity-a",
"/vanity-b");
// build /etc/map structure
resourceProvider.putResource("/etc");
@@ -299,6 +300,17 @@ public class ResourceMapperImplTest {
.allMappingsWithRequest("/app/alias-parent/alias-child-1",
"/app/alias-parent/alias-child-2", "/app/alias-parent/child-multiple",
"/app/parent/alias-child-1", "/app/parent/alias-child-2",
"/app/parent/child-multiple")
.verify(resolver, req);
}
+
+ @Test
+ @Ignore
+ public void mapResourceWithVanityPaths() {
+ ExpectedMappings.existingResource("/vain")
+ .singleMapping("/vanity-a")
+ .singleMappingWithRequest("/app/vanity-a")
+ .allMappings("/vanity-a", "/vanity-b", "/vani")
+ .allMappingsWithRequest("/app/vanity-a", "/app/vanity-b",
"/app/vain")
+ .verify(resolver, req);
+ }
static class ExpectedMappings {