You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2019/06/11 11:42:49 UTC

[sling-org-apache-sling-testing-sling-mock] branch master updated: SLING-8482 sling-mock: Content Loader should ignore JCR properties for versioning, checkout, policies

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

sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git


The following commit(s) were added to refs/heads/master by this push:
     new addcccd  SLING-8482 sling-mock: Content Loader should ignore JCR properties for versioning, checkout, policies
addcccd is described below

commit addcccdd50759d11c958629c08020b40c101bc75
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Tue Jun 11 13:42:40 2019 +0200

    SLING-8482 sling-mock: Content Loader should ignore JCR properties for versioning, checkout, policies
---
 .../sling/testing/mock/sling/loader/ContentLoader.java     | 14 ++++++++++----
 core/src/test/resources/SLING-INF/nodetypes/app.cnd        |  4 ----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java b/core/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java
index ef117ad..856a0a5 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java
@@ -55,9 +55,8 @@ public final class ContentLoader {
 
     private static final String CONTENTTYPE_OCTET_STREAM = "application/octet-stream";
 
-    // set of resource or property names that is used when other resource resolver types than JCR_OAK are used
-    private static final Set<String> MOCK_IGNORED_NAMES = ImmutableSet.<String>builder()
-            .add(JcrConstants.JCR_MIXINTYPES)
+    // set of resource or property names that are ignored for all resource resolver types
+    private static final Set<String> SHARED_IGNORED_NAMES = ImmutableSet.<String>builder()
             .add(JcrConstants.JCR_BASEVERSION)
             .add(JcrConstants.JCR_PREDECESSORS)
             .add(JcrConstants.JCR_SUCCESSORS)
@@ -67,8 +66,15 @@ public final class ContentLoader {
             .add("rep:policy")
             .build();
     
-    // set of resource or property names that is used when JCR_OAK resource resolver type (= a real repo impl) is used
+    // set of resource or property names that are ignored when other resource resolver types than JCR_OAK are used
+    private static final Set<String> MOCK_IGNORED_NAMES = ImmutableSet.<String>builder()
+            .addAll(SHARED_IGNORED_NAMES)
+            .add(JcrConstants.JCR_MIXINTYPES)
+            .build();
+    
+    // set of resource or property names that are ignored when JCR_OAK resource resolver type (= a real repo impl) is used
     private static final Set<String> OAK_IGNORED_NAMES = ImmutableSet.<String>builder()
+            .addAll(SHARED_IGNORED_NAMES)
             .add(JcrConstants.JCR_UUID)
             .add(JcrConstants.JCR_CREATED)
             .build();
diff --git a/core/src/test/resources/SLING-INF/nodetypes/app.cnd b/core/src/test/resources/SLING-INF/nodetypes/app.cnd
index 865cc1d..250dd82 100644
--- a/core/src/test/resources/SLING-INF/nodetypes/app.cnd
+++ b/core/src/test/resources/SLING-INF/nodetypes/app.cnd
@@ -23,10 +23,6 @@
 [app:PageContent] > nt:unstructured
 
 [dam:Asset] > nt:unstructured
- - jcr:versionHistory (string) copy
- - jcr:baseVersion (string) copy
- - jcr:predecessors (string) multiple
- - jcr:isCheckedOut (boolean) copy
 [dam:AssetContent] > nt:unstructured
 
 [app:Taggable] mixin