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 2018/01/16 09:38:29 UTC

[sling-ide-tooling] branch master updated: SLING-6462 - Filter Isolated jcr:content nodes (by includes) are not deployed

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-ide-tooling.git


The following commit(s) were added to refs/heads/master by this push:
     new 73c1a74  SLING-6462 - Filter Isolated jcr:content nodes (by includes) are not deployed
73c1a74 is described below

commit 73c1a748c6ef2b81d06f27e7faa6130caa364c82
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Jan 16 11:37:53 2018 +0200

    SLING-6462 - Filter Isolated jcr:content nodes (by includes) are not deployed
    
    Add a test in VltFilterTest which exercises filters with include statements.
---
 .../sling/ide/impl/vlt/filter/VltFilterTest.java   |  8 +++++++
 .../ide/impl/vlt/filter/filter-with-include.xml    | 26 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/filter/VltFilterTest.java b/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/filter/VltFilterTest.java
index 7b027ac..478afb5 100644
--- a/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/filter/VltFilterTest.java
+++ b/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/filter/VltFilterTest.java
@@ -73,5 +73,13 @@ public class VltFilterTest {
                     is(FilterResult.PREREQUISITE));
         }
     }
+    
+    @Test
+    public void filterWithInclude() throws IOException, ConfigurationException {
+        
+        assertThat(newFilter("filter-with-include.xml").filter("/etc/designs/base"), is(FilterResult.PREREQUISITE));
+        assertThat(newFilter("filter-with-include.xml").filter("/etc/designs/base/jcr:content"), is(FilterResult.ALLOW));
+        assertThat(newFilter("filter-with-include.xml").filter("/etc/designs/base/other"), is(FilterResult.DENY));
+    }
 
 }
diff --git a/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/filter/filter-with-include.xml b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/filter/filter-with-include.xml
new file mode 100644
index 0000000..99e2888
--- /dev/null
+++ b/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/filter/filter-with-include.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<!--
+    Defines which repository items are generally included
+-->
+<workspaceFilter vesion="1.0">
+    <filter root="/etc/designs/base">
+    	<include pattern="/etc/designs/base/jcr:content"/>
+    </filter>
+</workspaceFilter>

-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].