sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1597566 - /sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
Date Mon, 26 May 2014 11:41:46 GMT
Author: rombert
Date: Mon May 26 11:41:45 2014
New Revision: 1597566

URL: http://svn.apache.org/r1597566
Log:
SLING-3586 - Publishing content fails if intermediate nodes are not
present in the repository

Added a disabled test

Modified:
    sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java

Modified: sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java?rev=1597566&r1=1597565&r2=1597566&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
(original)
+++ sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/ContentDeploymentTest.java
Mon May 26 11:41:45 2014
@@ -49,6 +49,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.JavaCore;
 import org.hamcrest.Matcher;
 import org.junit.After;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
@@ -234,6 +235,41 @@ public class ContentDeploymentTest {
 
     }
 
+    @Test
+    @Ignore("SLING-3586")
+    public void deployFileWithMissingParentFromRepository() throws Exception {
+
+        wstServer.waitForServerToStart();
+
+        // create faceted project
+        IProject contentProject = projectRule.getProject();
+
+        ProjectAdapter project = new ProjectAdapter(contentProject);
+        project.addNatures(JavaCore.NATURE_ID, "org.eclipse.wst.common.project.facet.core.nature");
+
+        // install bundle facet
+        project.installFacet("sling.content", "1.0");
+
+        ServerAdapter server = new ServerAdapter(wstServer.getServer());
+        server.installModule(contentProject);
+
+        // create filter.xml
+        project.createVltFilterWithRoots("/test/demo/nested/structure");
+        // create file
+        project.createOrUpdateFile(Path.fromPortableString("jcr_root/test/demo/nested/structure/hello.txt"),
+                new ByteArrayInputStream("hello, world".getBytes()));
+
+        // verify that file is created
+        final RepositoryAccessor repo = new RepositoryAccessor(config);
+        Poller poller = new Poller();
+        poller.pollUntil(new Callable<Node>() {
+            @Override
+            public Node call() throws RepositoryException {
+                return repo.getNode("/test/demo/nested/structure/hello.txt");
+            }
+        }, nullValue(Node.class));
+    }
+
     private void assertThatNode(final RepositoryAccessor repo, Poller poller, final String
nodePath, Matcher<Node> matcher)
             throws InterruptedException {
 



Mime
View raw message