This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.crankstart.launcher-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-crankstart-launcher.git
commit 50eaf270238abb71cd82f49edf319576f35ad43a Author: Bertrand Delacretaz <[email protected]> AuthorDate: Mon Jun 2 14:33:42 2014 +0000 Register resources with the Sling installer via a crankstart extension command git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/crankstart/launcher@1599226 13f79535-47bb-0310-9956-ffa450edef68 --- .../sling/crankstart/launcher/CrankstartBootstrapTest.java | 9 +++++++++ src/test/resources/launcher-test.crank.txt | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java b/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java index 0de1a73..9c91184 100644 --- a/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java +++ b/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java @@ -135,6 +135,15 @@ public class CrankstartBootstrapTest { assertEquals("was set by test-services bundle", System.getProperty(TEST_SYSTEM_PROPERTY)); } + @Test + @Retry(timeoutMsec=10000, intervalMsec=250) + public void testJUnitServlet() throws Exception { + final String path = "/system/sling/junit"; + final GetMethod get = new GetMethod(baseUrl + path); + client.executeMethod(get); + assertEquals("Expecting JUnit servlet to be installed via sling extension command, at " + get.getURI(), 200, get.getStatusCode()); + } + private static String getOsgiStoragePath() { final File tmpRoot = new File(System.getProperty("java.io.tmpdir")); final Random random = new Random(); diff --git a/src/test/resources/launcher-test.crank.txt b/src/test/resources/launcher-test.crank.txt index a250a44..8bc7b3b 100644 --- a/src/test/resources/launcher-test.crank.txt +++ b/src/test/resources/launcher-test.crank.txt @@ -26,6 +26,7 @@ bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.10 bundle mvn:org.apache.sling/org.apache.sling.commons.osgi/2.2.1-SNAPSHOT bundle mvn:org.apache.sling/org.apache.sling.commons.log/2.1.2 bundle mvn:org.apache.felix/org.apache.felix.configadmin/1.6.0 +bundle mvn:org.apache.felix/org.apache.felix.webconsole/3.1.6 # The crankstart.api.fragment bundle makes the crankstart.api package available # to bundles, required for bundles to provide crankstart extension commands like @@ -33,6 +34,13 @@ bundle mvn:org.apache.felix/org.apache.felix.configadmin/1.6.0 bundle mvn:org.apache.sling/org.apache.sling.crankstart.api.fragment/0.0.1-SNAPSHOT bundle mvn:org.apache.sling/org.apache.sling.crankstart.test.services/0.0.1-SNAPSHOT +# Test our Sling extension commands, that add a bundle via the Sling installer +# (which requires commons.json and jcr-wrapper) +bundle mvn:org.apache.sling/org.apache.sling.installer.core/3.5.0 +bundle mvn:org.apache.sling/org.apache.sling.commons.json/2.0.6 +bundle mvn:org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0 +bundle mvn:org.apache.sling/org.apache.sling.crankstart.sling.extensions/0.0.1-SNAPSHOT + # Now start our bundles start.all.bundles @@ -52,5 +60,8 @@ config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet # Test an extension command provided by our test-services bundle test.system.property the.test.system.property was set by test-services bundle +# Add the JUnit core via the Sling installer and our sling.extensions +sling.installer.resource mvn:org.apache.sling/org.apache.sling.junit.core/1.0.8 + # Informative log log felix http service should come up at http://localhost:${http.port} \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
