You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2015/04/03 10:09:05 UTC

svn commit: r1671013 - in /sling/trunk/contrib/launchpad/karaf: org.apache.sling.launchpad.karaf-features/src/main/feature/ org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/

Author: olli
Date: Fri Apr  3 08:09:05 2015
New Revision: 1671013

URL: http://svn.apache.org/r1671013
Log:
SLING-4570 provide Distribution feature

Added:
    sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingExtensionDistributionIT.java
Modified:
    sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features/src/main/feature/feature.xml

Modified: sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features/src/main/feature/feature.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features/src/main/feature/feature.xml?rev=1671013&r1=1671012&r2=1671013&view=diff
==============================================================================
--- sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features/src/main/feature/feature.xml (original)
+++ sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features/src/main/feature/feature.xml Fri Apr  3 08:09:05 2015
@@ -340,6 +340,18 @@
     <bundle dependency="true">mvn:org.apache.sling/org.apache.sling.auth.xing.api/0.0.2</bundle>
   </feature>
   <!-- Apache Sling Extensions (contrib) -->
+  <feature name="sling-extension-distribution" version="${project.version}">
+    <feature version="${project.version}">sling</feature>
+    <feature version="${project.version}">sling-extension-event</feature>
+    <feature version="${project.version}">sling-extension-healthcheck</feature>
+    <feature version="${project.version}">jackrabbit-sling</feature>
+    <bundle>mvn:org.apache.sling/org.apache.sling.distribution.api/0.1.0</bundle>
+    <bundle>mvn:org.apache.sling/org.apache.sling.distribution.core/0.1.0</bundle>
+    <!-- bundle dependencies -->
+    <bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
+    <bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1</bundle>
+    <bundle dependency="true">mvn:org.apache.jackrabbit.vault/org.apache.jackrabbit.vault/3.1.16</bundle>
+  </feature>
   <feature name="sling-extension-healthcheck" version="${project.version}">
     <feature version="${project.version}">sling</feature>
     <feature version="${project.version}">sling-jcr</feature>

Added: sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingExtensionDistributionIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingExtensionDistributionIT.java?rev=1671013&view=auto
==============================================================================
--- sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingExtensionDistributionIT.java (added)
+++ sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingExtensionDistributionIT.java Fri Apr  3 08:09:05 2015
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+package org.apache.sling.launchpad.karaf.tests.bootstrap;
+
+import org.apache.sling.launchpad.karaf.testing.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.OptionUtils;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+import org.osgi.framework.Bundle;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SlingExtensionDistributionIT extends KarafTestSupport {
+
+    @Configuration
+    public Option[] configuration() {
+        return OptionUtils.combine(baseConfiguration(),
+            addBootFeature("sling-extension-distribution")
+        );
+    }
+
+    @Test
+    public void testOrgApacheSlingDistributionApi() {
+        final Bundle bundle = findBundle("org.apache.sling.distribution.api");
+        assertNotNull(bundle);
+        assertEquals(Bundle.ACTIVE, bundle.getState());
+    }
+
+    @Test
+    public void testOrgApacheSlingDistributionCore() {
+        final Bundle bundle = findBundle("org.apache.sling.distribution.core");
+        assertNotNull(bundle);
+        assertEquals(Bundle.ACTIVE, bundle.getState());
+    }
+
+    @Test
+    public void testOrgApacheHttpcomponentsHttpcore() {
+        final Bundle bundle = findBundle("org.apache.httpcomponents.httpcore");
+        assertNotNull(bundle);
+        assertEquals(Bundle.ACTIVE, bundle.getState());
+    }
+
+    @Test
+    public void testOrgApacheHttpcomponentsHttpclient() {
+        final Bundle bundle = findBundle("org.apache.httpcomponents.httpclient");
+        assertNotNull(bundle);
+        assertEquals(Bundle.ACTIVE, bundle.getState());
+    }
+
+    @Test
+    public void testOrgApacheJackrabbitVault() {
+        final Bundle bundle = findBundle("org.apache.jackrabbit.vault");
+        assertNotNull(bundle);
+        assertEquals(Bundle.ACTIVE, bundle.getState());
+    }
+
+}