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/02/12 11:35:56 UTC
svn commit: r1659207 - in
/sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap:
OakSlingIT.java SlingJcrOakIT.java SlingLaunchpadOakIT.java
Author: olli
Date: Thu Feb 12 10:35:55 2015
New Revision: 1659207
URL: http://svn.apache.org/r1659207
Log:
SLING-4411 provide Oak features
* add integration tests
Added:
sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/OakSlingIT.java
sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingJcrOakIT.java
sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingLaunchpadOakIT.java
Added: sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/OakSlingIT.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/OakSlingIT.java?rev=1659207&view=auto
==============================================================================
--- sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/OakSlingIT.java (added)
+++ sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/OakSlingIT.java Thu Feb 12 10:35:55 2015
@@ -0,0 +1,101 @@
+/*
+ * 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 OakSlingIT extends KarafTestSupport {
+
+ @Configuration
+ public Option[] configuration() {
+ return OptionUtils.combine(baseConfiguration(),
+ addBootFeature("oak-sling")
+ );
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakCore() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-core");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakCommons() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-commons");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakMk() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-mk");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakMkApi() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-mk-api");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakMkRemote() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-mk-remote");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakLucene() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-lucene");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheJackrabbitOakBlob() {
+ final Bundle bundle = findBundle("org.apache.jackrabbit.oak-blob");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+ @Test
+ public void testComGoogleGuava() {
+ final Bundle bundle = findBundle("com.google.guava");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+}
Added: sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingJcrOakIT.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/SlingJcrOakIT.java?rev=1659207&view=auto
==============================================================================
--- sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingJcrOakIT.java (added)
+++ sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingJcrOakIT.java Thu Feb 12 10:35:55 2015
@@ -0,0 +1,60 @@
+/*
+ * 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 SlingJcrOakIT extends KarafTestSupport {
+
+ @Configuration
+ public Option[] configuration() {
+ return OptionUtils.combine(baseConfiguration(),
+ addBootFeature("sling-jcr-oak")
+ );
+ }
+
+ @Test
+ public void testOrgApacheSlingJcrOakServer() {
+ final Bundle bundle = findBundle("org.apache.sling.jcr.oak.server");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+ @Test
+ public void testOrgApacheFelixJaas() {
+ final Bundle bundle = findBundle("org.apache.felix.jaas");
+ assertNotNull(bundle);
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+
+}
Added: sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingLaunchpadOakIT.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/SlingLaunchpadOakIT.java?rev=1659207&view=auto
==============================================================================
--- sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingLaunchpadOakIT.java (added)
+++ sling/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-integration-tests/src/test/java/org/apache/sling/launchpad/karaf/tests/bootstrap/SlingLaunchpadOakIT.java Thu Feb 12 10:35:55 2015
@@ -0,0 +1,65 @@
+/*
+ * 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 javax.inject.Inject;
+import javax.jcr.Session;
+
+import org.apache.sling.jcr.api.SlingRepository;
+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.ops4j.pax.exam.util.Filter;
+
+import static org.junit.Assert.assertNotNull;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SlingLaunchpadOakIT extends KarafTestSupport {
+
+ @Inject
+ @Filter(timeout = 300000)
+ public SlingRepository slingRepository;
+
+ @Configuration
+ public Option[] configuration() {
+ return OptionUtils.combine(baseConfiguration(),
+ addBootFeature("sling-launchpad-oak")
+ );
+ }
+
+ @Test
+ public void testSlingRepository() throws Exception {
+ assertNotNull(slingRepository);
+ }
+
+ @Test
+ public void testVarSlingExists() throws Exception {
+ final Session session = slingRepository.loginAdministrative(null);
+ session.getRootNode().getNode("var/sling");
+ session.logout();
+ }
+
+}