Author: bdelacretaz
Date: Mon Jun 15 13:03:29 2015
New Revision: 1685576

URL: http://svn.apache.org/r1685576
Log:
SLING-4728 - add test-models to test nested provisioning model support

Added:
    sling/trunk/contrib/crankstart/test-model/   (with props)
    sling/trunk/contrib/crankstart/test-model/pom.xml
    sling/trunk/contrib/crankstart/test-model/src/
    sling/trunk/contrib/crankstart/test-model/src/main/
    sling/trunk/contrib/crankstart/test-model/src/main/provisioning/
    sling/trunk/contrib/crankstart/test-model/src/main/provisioning/bundles.txt
Modified:
    sling/trunk/contrib/crankstart/launcher/pom.xml
    
sling/trunk/contrib/crankstart/launcher/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
    
sling/trunk/contrib/crankstart/launcher/src/test/resources/provisioning-model/crankstart-tests.txt
    sling/trunk/contrib/crankstart/pom.xml

Modified: sling/trunk/contrib/crankstart/launcher/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/launcher/pom.xml?rev=1685576&r1=1685575&r2=1685576&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/launcher/pom.xml (original)
+++ sling/trunk/contrib/crankstart/launcher/pom.xml Mon Jun 15 13:03:29 2015
@@ -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>
@@ -163,6 +164,20 @@
             <scope>test</scope>
         </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>

Modified: 
sling/trunk/contrib/crankstart/launcher/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/launcher/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java?rev=1685576&r1=1685575&r2=1685576&view=diff
==============================================================================
--- 
sling/trunk/contrib/crankstart/launcher/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
 (original)
+++ 
sling/trunk/contrib/crankstart/launcher/src/test/java/org/apache/sling/crankstart/launcher/BasicLauncherIT.java
 Mon Jun 15 13:03:29 2015
@@ -17,6 +17,7 @@ import org.apache.sling.commons.testing.
 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;
 
@@ -109,6 +110,23 @@ public class BasicLauncherIT {
         };
         
         for(String name : addBundles) {
+            try {
+                osgiConsole.checkBundleInstalled(name, U.LONG_TIMEOUT_SECONDS);
+            } catch(AssertionError ae) {
+                fail("Expected bundle to be present:" + name);
+            }
+        }
+    }
+    
+    @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) {

Modified: 
sling/trunk/contrib/crankstart/launcher/src/test/resources/provisioning-model/crankstart-tests.txt
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/launcher/src/test/resources/provisioning-model/crankstart-tests.txt?rev=1685576&r1=1685575&r2=1685576&view=diff
==============================================================================
--- 
sling/trunk/contrib/crankstart/launcher/src/test/resources/provisioning-model/crankstart-tests.txt
 (original)
+++ 
sling/trunk/contrib/crankstart/launcher/src/test/resources/provisioning-model/crankstart-tests.txt
 Mon Jun 15 13:03:29 2015
@@ -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

Modified: sling/trunk/contrib/crankstart/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/pom.xml?rev=1685576&r1=1685575&r2=1685576&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/pom.xml (original)
+++ sling/trunk/contrib/crankstart/pom.xml Mon Jun 15 13:03:29 2015
@@ -15,6 +15,7 @@
 
     <modules>
         <module>test-services</module>
+        <module>test-model</module>
         <module>launcher</module>
     </modules>
 </project>

Propchange: sling/trunk/contrib/crankstart/test-model/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun 15 13:03:29 2015
@@ -0,0 +1,16 @@
+target
+bin
+*.iml
+*.ipr
+*.iws
+.settings
+.project
+.classpath
+.externalToolBuilders
+maven-eclipse.xml
+felix-cache
+CRANKSTART
+derby.log
+jackrabbit
+tarmk
+

Added: sling/trunk/contrib/crankstart/test-model/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/test-model/pom.xml?rev=1685576&view=auto
==============================================================================
--- sling/trunk/contrib/crankstart/test-model/pom.xml (added)
+++ sling/trunk/contrib/crankstart/test-model/pom.xml Mon Jun 15 13:03:29 2015
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+    <!--
+        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.
+    -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>22</version>
+        <relativePath/>
+    </parent>
+
+    <artifactId>org.apache.sling.cransktart.test.model</artifactId>
+    <packaging>slingfeature</packaging>
+    <version>1.9.9-SNAPSHOT</version>
+
+    <name>Apache Sling Crankstart Test Provisioning Model</name>
+    <description>
+        Additional Provisioning Model used in Crankstart tests. 
+    </description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>slingstart-maven-plugin</artifactId>
+                <version>1.2.0</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
+

Added: 
sling/trunk/contrib/crankstart/test-model/src/main/provisioning/bundles.txt
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/test-model/src/main/provisioning/bundles.txt?rev=1685576&view=auto
==============================================================================
--- sling/trunk/contrib/crankstart/test-model/src/main/provisioning/bundles.txt 
(added)
+++ sling/trunk/contrib/crankstart/test-model/src/main/provisioning/bundles.txt 
Mon Jun 15 13:03:29 2015
@@ -0,0 +1,25 @@
+#
+#  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.
+#
+
+# Nested model used in crankstart tests
+[feature name=crankstart.test.model]
+
+[artifacts]
+  org.apache.sling/org.apache.sling.commons.testing/2.0.18
+  org.apache.sling/org.apache.sling.commons.threads/3.2.0


Reply via email to