Fix registration of multiple resources via the Sling installer
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1607039 13f79535-47bb-0310-9956-ffa450edef68
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 c0d7f0d..f5c8547 100644
--- a/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java
+++ b/src/test/java/org/apache/sling/crankstart/launcher/CrankstartBootstrapTest.java
@@ -193,6 +193,29 @@
@Test
@Retry(timeoutMsec=10000, intervalMsec=250)
+ public void testAdditionalBundles() throws Exception {
+ setAdminCredentials();
+ final String basePath = "/system/console/bundles/";
+ final String [] addBundles = {
+ "org.apache.sling.commons.mime",
+ "org.apache.sling.settings"
+ };
+
+ for(String name : addBundles) {
+ final String path = basePath + name;
+ final HttpUriRequest get = new HttpGet(baseUrl + path);
+ HttpResponse response = null;
+ try {
+ response = client.execute(get);
+ assertEquals("Expecting additional bundle to be present at " + get.getURI(), 200, response.getStatusLine().getStatusCode());
+ } finally {
+ closeConnection(response);
+ }
+ }
+ }
+
+ @Test
+ @Retry(timeoutMsec=10000, intervalMsec=250)
public void testFelixFormatConfig() throws Exception {
setAdminCredentials();
final String path = "/system/console/config/configuration-status-20140606-1347+0200.txt";
diff --git a/src/test/resources/launcher-test.crank.txt b/src/test/resources/launcher-test.crank.txt
index 84435f6..32266d5 100644
--- a/src/test/resources/launcher-test.crank.txt
+++ b/src/test/resources/launcher-test.crank.txt
@@ -69,8 +69,13 @@
# 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
+# Prepare additional resources for the Sling installer
sling.installer.resource mvn:org.apache.sling/org.apache.sling.junit.core/1.0.8
+sling.installer.resource mvn:org.apache.sling/org.apache.sling.commons.mime/2.1.4
+sling.installer.resource mvn:org.apache.sling/org.apache.sling.settings/1.3.0
+
+# And register the installer resources
+sling.installer.register crankstart
# Informative log
log felix http service should come up at http://localhost:${http.port}