jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1795286 - in /jackrabbit/commons/filevault/trunk/vault-core/src/test: java/org/apache/jackrabbit/vault/packaging/integration/ resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/
Date Tue, 16 May 2017 09:43:28 GMT
Author: tripod
Date: Tue May 16 09:43:28 2017
New Revision: 1795286

URL: http://svn.apache.org/viewvc?rev=1795286&view=rev
Log:
JRVLT-176 Package with non-deep filter removes node

Added:
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/test-package-with-etc.zip
Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestPackageInstall.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestPackageInstall.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestPackageInstall.java?rev=1795286&r1=1795285&r2=1795286&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestPackageInstall.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestPackageInstall.java
Tue May 16 09:43:28 2017
@@ -24,6 +24,7 @@ import javax.jcr.NodeIterator;
 import javax.jcr.Property;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NodeType;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.jackrabbit.vault.fs.io.ImportOptions;
@@ -266,6 +267,32 @@ public class TestPackageInstall extends
         pack.install(getDefaultOptions());
     }
 
+    /**
+     * Installs a package with non-child filter doesn't remove the root.
+     *
+     * <pre>
+     *   <workspaceFilter version="1.0">
+     *   <filter root="/etc">
+     *     <include pattern="/etc"/>
+     *     <include pattern="/etc/clientlibs"/>
+     *     <include pattern="/etc/clientlibs/granite"/>
+     *     <include pattern="/etc/clientlibs/granite/test(/.*)?"/>
+     *   </filter>
+     *  </workspaceFilter>
+     */
+    @Test
+    @Ignore("JCRVLT-176")
+    public void testNoChildFilter() throws RepositoryException, IOException, PackageException
{
+        File tmpFile = File.createTempFile("vlttest", "zip");
+        IOUtils.copy(getStream("testpackages/test-package-with-etc.zip"), FileUtils.openOutputStream(tmpFile));
+        JcrPackage pack = packMgr.upload(tmpFile, true, true, "test-package-with-etc", false);
+        assertNodeExists("/etc");
+        admin.getNode("/etc").addNode("foo", NodeType.NT_FOLDER);
+        admin.save();
+        pack.install(getDefaultOptions());
+        assertNodeExists("/etc/foo");
+    }
+
     @Test
     public void testDeepContentImport() throws IOException, RepositoryException, PackageException
{
         JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_test_deep.zip"), false);

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/test-package-with-etc.zip
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/test-package-with-etc.zip?rev=1795286&view=auto
==============================================================================
Binary files jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/test-package-with-etc.zip
(added) and jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/test-package-with-etc.zip
Tue May 16 09:43:28 2017 differ



Mime
View raw message