SLING-4728 - add test-models to test nested provisioning model support

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1685576 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 804ab53..c53b43a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@
                         </goals>
                         <configuration>
                             <includeGroupIds>org.slf4j,org.ops4j.pax.url,org.apache.sling</includeGroupIds>
+                            <includeTypes>jar</includeTypes>
                             <excludeTransitive>false</excludeTransitive>
                             <outputDirectory>${project.build.directory}/classes</outputDirectory>
                             <overWriteReleases>false</overWriteReleases>
@@ -164,6 +165,20 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.cransktart.test.model</artifactId>
+            <type>txt</type>
+            <!-- TODO should also be <classifier>slingfeature</classifier> -->
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.crankstart.test.services</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.tools</artifactId>
             <version>1.0.10</version>
             <scope>test</scope>
diff --git a/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java b/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
index 5847aac..c70a737 100644
--- a/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
+++ b/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
@@ -17,6 +17,7 @@
 import org.apache.sling.testing.tools.osgi.WebconsoleClient;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -118,6 +119,23 @@
     }
     
     @Test
+    @Ignore("until test-model is deployed with classifier=slingfeature")
+    public void testBundlesFromNestedModel() throws Exception {
+        final String [] addBundles = {
+                "org.apache.sling.commons.threads",
+                "org.apache.sling.commons.testing"
+        };
+        
+        for(String name : addBundles) {
+            try {
+                osgiConsole.checkBundleInstalled(name, U.LONG_TIMEOUT_SECONDS);
+            } catch(AssertionError ae) {
+                fail("Expected bundle to be present:" + name);
+            }
+        }
+    }
+    
+    @Test
     @Retry(timeoutMsec=U.LONG_TIMEOUT_MSEC, intervalMsec=U.STD_INTERVAL)
     public void testSpecificStartLevel() throws Exception {
         // This bundle should only be installed, as it's set to start level 99
diff --git a/src/test/resources/provisioning-model/crankstart-tests.txt b/src/test/resources/provisioning-model/crankstart-tests.txt
index a0a0dbd..0f0926c 100644
--- a/src/test/resources/provisioning-model/crankstart-tests.txt
+++ b/src/test/resources/provisioning-model/crankstart-tests.txt
@@ -25,8 +25,8 @@
   org.apache.sling/org.apache.sling.commons.mime/2.1.8
   org.apache.sling/org.apache.sling.settings/1.3.6
   
-  # TODO: Test a nested model file
-  # org.apache.sling/org.apache.sling.launchpad/8-SNAPSHOT/slingstart
+  # Test a nested model file
+  org.apache.sling/org.apache.sling.crankstart.test.model/1.9.9-SNAPSHOT/txt
 
 [artifacts runModes=A]
   org.apache.sling/org.apache.sling.api/2.9.0