This is an automated email from the ASF dual-hosted git repository. olli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git
commit ef82b8db74931290dee213efcb73dac386311124 Author: Oliver Lietz <[email protected]> AuthorDate: Thu Dec 28 12:05:41 2017 +0100 use org.apache.sling.testing.paxexam 0.0.5-SNAPSHOT --- pom.xml | 4 +-- .../freemarker/it/tests/FreemarkerTestSupport.java | 35 ++++++---------------- src/test/resources/exam.properties | 19 ------------ src/test/resources/logback.xml | 30 ------------------- 4 files changed, 11 insertions(+), 77 deletions(-) diff --git a/pom.xml b/pom.xml index c43d60c..6ec859a 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,7 @@ <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.framework</artifactId> - <version>5.6.2</version> + <version>5.6.10</version> <scope>test</scope> </dependency> <!-- Apache Sling --> @@ -214,7 +214,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.paxexam</artifactId> - <version>0.0.4</version> + <version>0.0.5-SNAPSHOT</version> <scope>provided</scope> </dependency> <!-- FreeMarker --> diff --git a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java index 68ce44c..7161ee9 100644 --- a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java +++ b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java @@ -29,18 +29,16 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.ProbeBuilder; import org.ops4j.pax.exam.TestProbeBuilder; import org.ops4j.pax.exam.util.Filter; -import org.ops4j.pax.exam.util.PathUtils; import org.osgi.framework.Constants; import org.osgi.service.http.HttpService; -import static org.apache.sling.testing.paxexam.SlingOptions.slingExtensionModels; -import static org.apache.sling.testing.paxexam.SlingOptions.slingLaunchpadOakTar; +import static org.apache.sling.testing.paxexam.SlingOptions.slingModels; +import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar; +import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence; import static org.apache.sling.testing.paxexam.SlingOptions.slingScripting; import static org.ops4j.pax.exam.CoreOptions.composite; import static org.ops4j.pax.exam.CoreOptions.junitBundles; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration; public abstract class FreemarkerTestSupport extends TestSupport { @@ -63,20 +61,16 @@ public abstract class FreemarkerTestSupport extends TestSupport { public Option baseConfiguration() { return composite( super.baseConfiguration(), - launchpad(), + quickstart(), // Sling Scripting FreeMarker testBundle("bundle.filename"), mavenBundle().groupId("org.freemarker").artifactId("freemarker").versionAsInProject(), mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.jaxp-api-1.4").versionAsInProject(), // testing - mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.resource.presence").versionAsInProject(), - factoryConfiguration("org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended") - .put("user.mapping", new String[]{"org.apache.sling.resource.presence=sling-readall"}) - .asOption(), + slingResourcePresence(), mavenBundle().groupId("org.jsoup").artifactId("jsoup").versionAsInProject(), mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(), - junitBundles(), - logging() + junitBundles() ); } @@ -91,25 +85,14 @@ public abstract class FreemarkerTestSupport extends TestSupport { return testProbeBuilder; } - protected Option launchpad() { + protected Option quickstart() { final int httpPort = findFreePort(); final String workingDirectory = workingDirectory(); return composite( - slingLaunchpadOakTar(workingDirectory, httpPort), - slingExtensionModels(), + slingQuickstartOakTar(workingDirectory, httpPort), + slingModels(), slingScripting() ); } - protected Option logging() { - final String filename = String.format("file:%s/src/test/resources/logback.xml", PathUtils.getBaseDir()); - return composite( - systemProperty("logback.configurationFile").value(filename), - mavenBundle().groupId("org.slf4j").artifactId("slf4j-api").version("1.7.21"), - mavenBundle().groupId("org.slf4j").artifactId("jcl-over-slf4j").version("1.7.21"), - mavenBundle().groupId("ch.qos.logback").artifactId("logback-core").version("1.1.7"), - mavenBundle().groupId("ch.qos.logback").artifactId("logback-classic").version("1.1.7") - ); - } - } diff --git a/src/test/resources/exam.properties b/src/test/resources/exam.properties deleted file mode 100644 index c98a668..0000000 --- a/src/test/resources/exam.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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. -# -pax.exam.logging=none diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml deleted file mode 100644 index 2b25d26..0000000 --- a/src/test/resources/logback.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?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. ---> -<configuration> - <appender name="file" class="ch.qos.logback.core.FileAppender"> - <file>target/testing.log</file> - <encoder> - <pattern>%date %level [%thread] %logger{10} [%file : %line] %msg%n</pattern> - </encoder> - </appender> - <root level="info"> - <appender-ref ref="file"/> - </root> -</configuration> -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
