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-karaf-launchpad-oak-tar-integration-tests.git
commit 67cb2fa35d3ab2f1ee05e4268885a54892212610 Author: Oliver Lietz <[email protected]> AuthorDate: Thu Sep 1 10:54:38 2016 +0000 SLING-3821 Run launchpad integration tests against Sling on Karaf enable repoinit tests git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1758758 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 4 ---- .../SlingLaunchpadOakTarConfiguration.java | 28 +++++++++++++++++++++- src/test/resources/repoinit.txt | 22 +++++++++++++++++ 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 91df7d7..06028fa 100644 --- a/pom.xml +++ b/pom.xml @@ -293,10 +293,6 @@ <exclude>org/apache/sling/launchpad/webapp/integrationtest/userManager/UpdateUserTest.*</exclude> <!-- TODO JspForwardTest.testWithJspForward:152 Content includes JSP marker --> <exclude>org/apache/sling/launchpad/webapp/integrationtest/JspForwardTest.*</exclude> - <!-- TODO RepoinitPathTest.pathExists:42 null --> - <exclude>org/apache/sling/launchpad/webapp/integrationtest/repository/RepoinitPathTest.*</exclude> - <!-- TODO SystemUsersTest.provisioningModelUser:62->assertSystemUser:45 Impersonation as provisioningModelUser failed: javax.jcr.LoginException: Login Failure: all modules ignored --> - <exclude>org/apache/sling/launchpad/webapp/integrationtest/repository/SystemUsersTest.*</exclude> </excludes> </configuration> </plugin> diff --git a/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java b/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java index abb9235..c704d24 100644 --- a/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java +++ b/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java @@ -18,19 +18,36 @@ */ package org.apache.sling.karaf.tests.configuration; +import java.io.FileInputStream; +import java.io.InputStream; + import org.apache.sling.karaf.testing.KarafTestSupport; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; +import org.ops4j.pax.tinybundles.core.TinyBundles; +import org.osgi.framework.Constants; import static org.ops4j.pax.exam.CoreOptions.cleanCaches; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.streamBundle; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; public class SlingLaunchpadOakTarConfiguration extends KarafTestSupport { + private Option testBundle() throws Exception { + final InputStream repoinit = new FileInputStream("src/test/resources/repoinit.txt"); + return streamBundle( + TinyBundles.bundle() + .add("repoinit.txt", repoinit) + .set(Constants.BUNDLE_MANIFESTVERSION, "2") + .set(Constants.BUNDLE_SYMBOLICNAME, "repoinit") + .build() + ).start(); + } + @Configuration - public Option[] configuration() { + public Option[] configuration() throws Exception { final int httpPort = Integer.getInteger("http.port"); return OptionUtils.combine(baseConfiguration(), cleanCaches(true), @@ -44,6 +61,7 @@ public class SlingLaunchpadOakTarConfiguration extends KarafTestSupport { // TODO PAXWEB-935 editConfigurationFilePut("etc/org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet.cfg", "dav.root", "/dav"), editConfigurationFilePut("etc/org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet.cfg", "alias", "/server"), editConfigurationFilePut("etc/org.apache.sling.resourceresolver.impl.observation.OsgiObservationBridge.cfg", "enabled", "true"), + editConfigurationFilePut("etc/org.apache.sling.jcr.repoinit.impl.RepositoryInitializer.cfg", "references", "raw:classpath://repoinit/repoinit.txt"), addSlingFeatures( "sling-launchpad-oak-tar", "sling-launchpad-content", @@ -57,8 +75,16 @@ public class SlingLaunchpadOakTarConfiguration extends KarafTestSupport { "sling-jcr-jackrabbit-security", "sling-jcr-repoinit" ), + // bundle for test (contains repoinit.txt) + testBundle(), // misc (legacy, snapshots, ...) stuff mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.servlets.compat").versionAsInProject(), + // Pax Url TODO: feature? + mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-commons").version("2.4.7"), + mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-classpath").version("2.4.7"), + mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-lang").version("1.5.0"), + mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-util-property").version("1.5.0"), + mavenBundle().groupId("org.ops4j.pax.swissbox").artifactId("pax-swissbox-property").version("1.8.2"), // test support mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.junit.core").versionAsInProject(), mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.junit.remote").versionAsInProject(), diff --git a/src/test/resources/repoinit.txt b/src/test/resources/repoinit.txt new file mode 100644 index 0000000..172002f --- /dev/null +++ b/src/test/resources/repoinit.txt @@ -0,0 +1,22 @@ +################################################################################ +# +# 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. +# +################################################################################ + +create path /repoinit/provisioningModelTest + +create service user provisioningModelUser -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
