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 2020/01/11 09:26:29 UTC
[sling-org-apache-sling-karaf-integration-tests] branch master
updated: SLING-8988 Remove NoSQL features
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-karaf-integration-tests.git
The following commit(s) were added to refs/heads/master by this push:
new 16d25cd SLING-8988 Remove NoSQL features
16d25cd is described below
commit 16d25cde0fa47b7e64a553d5c8547f5651543e22
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Jan 11 06:59:08 2020 +0100
SLING-8988 Remove NoSQL features
---
.../tests/bootstrap/SlingNosqlCouchbaseIT.java | 60 --------------
.../karaf/tests/bootstrap/SlingNosqlGenericIT.java | 53 ------------
.../karaf/tests/bootstrap/SlingNosqlMongoIT.java | 53 ------------
.../bootstrap/SlingQuickstartNosqlCouchbaseIT.java | 96 ----------------------
.../bootstrap/SlingQuickstartNosqlMongoIT.java | 91 --------------------
5 files changed, 353 deletions(-)
diff --git a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlCouchbaseIT.java b/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlCouchbaseIT.java
deleted file mode 100644
index d46c485..0000000
--- a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlCouchbaseIT.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.karaf.tests.bootstrap;
-
-import org.apache.sling.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 SlingNosqlCouchbaseIT extends KarafTestSupport {
-
- @Configuration
- public Option[] configuration() {
- return OptionUtils.combine(baseConfiguration(),
- addSlingFeatures("sling-nosql-couchbase")
- );
- }
-
- @Test
- public void testOrgApacheSlingNosqlCouchbaseClient() {
- final Bundle bundle = findBundle("org.apache.sling.nosql.couchbase-client");
- assertNotNull(bundle);
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-
- @Test
- public void testOrgApacheSlingNosqlCouchbaseResourceprovider() {
- final Bundle bundle = findBundle("org.apache.sling.nosql.couchbase-resourceprovider");
- assertNotNull(bundle);
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-
-}
diff --git a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlGenericIT.java b/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlGenericIT.java
deleted file mode 100644
index 503b8a4..0000000
--- a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlGenericIT.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.karaf.tests.bootstrap;
-
-import org.apache.sling.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 SlingNosqlGenericIT extends KarafTestSupport {
-
- @Configuration
- public Option[] configuration() {
- return OptionUtils.combine(baseConfiguration(),
- addSlingFeatures("sling-nosql-generic")
- );
- }
-
- @Test
- public void testOrgApacheSlingNosqlGeneric() {
- final Bundle bundle = findBundle("org.apache.sling.nosql.generic");
- assertNotNull(bundle);
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-
-}
diff --git a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlMongoIT.java b/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlMongoIT.java
deleted file mode 100644
index 9f99f80..0000000
--- a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingNosqlMongoIT.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.karaf.tests.bootstrap;
-
-import org.apache.sling.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 SlingNosqlMongoIT extends KarafTestSupport {
-
- @Configuration
- public Option[] configuration() {
- return OptionUtils.combine(baseConfiguration(),
- addSlingFeatures("sling-nosql-mongodb")
- );
- }
-
- @Test
- public void testOrgApacheSlingNosqlGeneric() {
- final Bundle bundle = findBundle("org.apache.sling.nosql.generic");
- assertNotNull(bundle);
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-
-}
diff --git a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlCouchbaseIT.java b/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlCouchbaseIT.java
deleted file mode 100644
index d4ea6fe..0000000
--- a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlCouchbaseIT.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.karaf.tests.bootstrap;
-
-import java.io.IOException;
-
-import javax.inject.Inject;
-
-import com.couchbase.mock.CouchbaseMock;
-import org.apache.sling.api.resource.ResourceProviderFactory;
-import org.apache.sling.karaf.testing.KarafTestSupport;
-import org.junit.AfterClass;
-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.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-
-@RunWith(PaxExam.class)
-@ExamReactorStrategy(PerClass.class)
-public class SlingQuickstartNosqlCouchbaseIT extends KarafTestSupport {
-
- private static CouchbaseMock couchbase;
-
- @Inject
- @Filter(timeout = 300000)
- public ResourceProviderFactory resourceProviderFactory;
-
- protected void startCouchbase(final int port) throws IOException, InterruptedException {
- couchbase = new CouchbaseMock("localhost", port, 10, 1024);
- couchbase.start();
- couchbase.waitForStartup();
- }
-
- @AfterClass // TODO does it work? (no - not supported by Pax Exam)
- public static void stopCouchbase() throws Exception {
- if (couchbase != null) {
- couchbase.stop();
- }
- }
-
- @Configuration
- public Option[] configuration() throws IOException, InterruptedException {
- final int port = findFreePort();
- startCouchbase(port);
- final String couchbaseHosts = String.format("localhost:%s", port);
- return OptionUtils.combine(baseConfiguration(),
- editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot", "(wrap)"),
- editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "couchbaseHosts", couchbaseHosts),
- editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "clientId", "sling-resourceprovider-couchbase"),
- editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "bucketName", "sling"),
- editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "enabled", "true"),
- wrappedBundle(mavenBundle().groupId("com.couchbase.mock").artifactId("CouchbaseMock").versionAsInProject()),
- wrappedBundle(mavenBundle().groupId("com.couchbase.client").artifactId("couchbase-client").versionAsInProject()),
- wrappedBundle(mavenBundle().groupId("com.intellij").artifactId("annotations").versionAsInProject()),
- mavenBundle().groupId("com.google.code.gson").artifactId("gson").versionAsInProject(),
- mavenBundle().groupId("com.googlecode.json-simple").artifactId("json-simple").versionAsInProject(),
- mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.rhino").versionAsInProject(),
- mavenBundle().groupId("org.tukaani").artifactId("xz").versionAsInProject(),
- addSlingFeatures("sling-quickstart-nosql-couchbase")
- );
- }
-
- @Test
- public void testResourceProviderFactory() {
- assertNotNull(resourceProviderFactory);
- assertEquals("org.apache.sling.nosql.couchbase.resourceprovider.impl.CouchbaseNoSqlResourceProviderFactory", resourceProviderFactory.getClass().getName());
- }
-
-}
diff --git a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlMongoIT.java b/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlMongoIT.java
deleted file mode 100644
index b865d4c..0000000
--- a/src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingQuickstartNosqlMongoIT.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.karaf.tests.bootstrap;
-
-import java.io.IOException;
-
-import javax.inject.Inject;
-
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodProcess;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.IMongodConfig;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
-import org.apache.sling.api.resource.ResourceProviderFactory;
-import org.apache.sling.karaf.testing.KarafTestSupport;
-import org.apache.sling.karaf.tests.support.MongodProcessStopper;
-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.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-
-@RunWith(PaxExam.class)
-@ExamReactorStrategy(PerClass.class)
-public class SlingQuickstartNosqlMongoIT extends KarafTestSupport {
-
- @Inject
- @Filter(timeout = 300000)
- public ResourceProviderFactory resourceProviderFactory;
-
- protected void startMongo(final int port) throws IOException {
- final MongodStarter starter = MongodStarter.getDefaultInstance();
- final Net net = new Net(port, Network.localhostIsIPv6());
- final IMongodConfig mongodConfig = new MongodConfigBuilder().version(Version.Main.PRODUCTION).net(net).build();
- final MongodExecutable executable = starter.prepare(mongodConfig);
- final MongodProcess process = executable.start();
- MongodProcessStopper.add(process);
- }
-
- @Configuration
- public Option[] configuration() throws IOException {
- final int port = Network.getFreeServerPort();
- startMongo(port);
- final String connectionString = String.format("localhost:%s", port);
- return OptionUtils.combine(baseConfiguration(),
- editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot", "(wrap)"),
- editConfigurationFilePut("etc/org.apache.sling.nosql.mongodb.resourceprovider.MongoDBNoSqlResourceProviderFactory.factory.config.config", "connectionString", connectionString),
- mavenBundle().groupId("de.flapdoodle.embed").artifactId("de.flapdoodle.embed.mongo").versionAsInProject(),
- mavenBundle().groupId("de.flapdoodle.embed").artifactId("de.flapdoodle.embed.process").versionAsInProject(),
- mavenBundle().groupId("net.java.dev.jna").artifactId("jna").versionAsInProject(),
- mavenBundle().groupId("net.java.dev.jna").artifactId("jna-platform").versionAsInProject(),
- mavenBundle().groupId("org.apache.commons").artifactId("commons-compress").versionAsInProject(),
- addSlingFeatures("sling-quickstart-nosql-mongodb")
- );
- }
-
- @Test
- public void testResourceProviderFactory() {
- assertNotNull(resourceProviderFactory);
- assertEquals("org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlResourceProviderFactory", resourceProviderFactory.getClass().getName());
- }
-
-}