This is an automated email from the ASF dual-hosted git repository. aduprat pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit be9a006b47120680af910ed0b3cb30f82ffcc602 Author: Gautier DI FOLCO <[email protected]> AuthorDate: Tue Apr 2 14:54:36 2019 +0200 JAMES-2671 Remove duplicated Swift tests and replace general BlobStore by AWS S3 --- .../CassandraRabbitMQSwiftSmtpTestRuleFactory.java | 75 ------------- .../mpt/smtp/SwiftRabbitMQForwardSmtpTest.java | 40 ------- .../smtp/SwiftRabbitMQSmtpStarttlsCommandTest.java | 40 ------- .../objectstorage/aws/s3/DockerAwsS3TestRule.java | 2 +- .../BlobStoreChoosingConfigurationTest.java | 2 +- .../blobstore/BlobStoreChoosingModuleTest.java | 14 +-- .../cassandra/cucumber/CucumberSwiftSingleton.java | 28 ----- .../rabbitmq/RabbitMQDeletedMessagesVaultTest.java | 4 +- .../RabbitMQSwiftForwardIntegrationTest.java | 47 -------- .../RabbitMQSwiftGetMailboxesMethodTest.java | 44 -------- .../RabbitMQSwiftGetMessageListMethodTest.java | 50 --------- .../RabbitMQSwiftGetVacationResponseTest.java | 50 --------- .../RabbitMQSwiftJmapAuthenticationTest.java | 46 -------- .../rabbitmq/RabbitMQSwiftProvisioningTest.java | 44 -------- .../rabbitmq/RabbitMQSwiftQuotaMailingTest.java | 42 ------- .../rabbitmq/RabbitMQSwiftSendMDNMethodTest.java | 59 ---------- .../RabbitMQSwiftSetMailboxesMethodTest.java | 49 -------- .../RabbitMQSwiftSetMessagesMethodTest.java | 65 ----------- .../RabbitMQSwiftSetVacationResponseTest.java | 49 -------- .../RabbitMQSwiftSpamAssassinContractTest.java | 53 --------- .../RabbitMQSwiftVacationIntegrationTest.java | 49 -------- .../RabbitMQSwiftVacationRelayIntegrationTest.java | 60 ---------- .../ReindexingWithEventDeadLettersTest.java | 4 +- .../cucumber/swift/CucumberCassandraSingleton.java | 27 ----- .../cucumber/swift/CucumberRabbitMQSingleton.java | 26 ----- .../cucumber/swift/CucumberSwiftSingleton.java | 28 ----- .../swift/RabbitMQDownloadCucumberTest.java | 36 ------ .../swift/RabbitMQGetMessagesMethodTest.java | 36 ------ .../RabbitMQIMAPKeywordsInconsistenciesTest.java | 36 ------ .../RabbitMQIMAPSetMessagesCompatibilityTest.java | 36 ------ .../cucumber/swift/RabbitMQMailboxSharingTest.java | 43 ------- .../cucumber/swift/RabbitMQMessageSharingTest.java | 44 -------- .../RabbitMQSetMailboxesMethodCucumberTest.java | 36 ------ .../RabbitMQSetMessagesMethodCucumberTest.java | 36 ------ .../cucumber/swift/RabbitMQSwiftStepdefs.java | 123 --------------------- .../cucumber/swift/RabbitMQUploadCucumberTest.java | 36 ------ 36 files changed, 13 insertions(+), 1446 deletions(-) diff --git a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQSwiftSmtpTestRuleFactory.java b/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQSwiftSmtpTestRuleFactory.java deleted file mode 100644 index 8791af0..0000000 --- a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQSwiftSmtpTestRuleFactory.java +++ /dev/null @@ -1,75 +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.james.mpt.smtp; - -import org.apache.commons.configuration.DefaultConfigurationBuilder; -import org.apache.james.CassandraJamesServerMain; -import org.apache.james.CleanupTasksPerformer; -import org.apache.james.GuiceJamesServer; -import org.apache.james.backend.rabbitmq.DockerRabbitMQSingleton; -import org.apache.james.backends.cassandra.init.configuration.ClusterConfiguration; -import org.apache.james.dnsservice.api.DNSService; -import org.apache.james.modules.TestRabbitMQModule; -import org.apache.james.modules.TestSwiftBlobStoreModule; -import org.apache.james.modules.blobstore.BlobStoreChoosingModule; -import org.apache.james.modules.protocols.SmtpGuiceProbe.SmtpServerConnectedType; -import org.apache.james.modules.rabbitmq.RabbitMQModule; -import org.apache.james.modules.server.CamelMailetContainerModule; -import org.apache.james.queue.api.MailQueueItemDecoratorFactory; -import org.apache.james.queue.api.RawMailQueueItemDecoratorFactory; -import org.apache.james.server.core.configuration.Configuration; -import org.apache.james.util.Host; -import org.junit.rules.TemporaryFolder; - -public final class CassandraRabbitMQSwiftSmtpTestRuleFactory { - public static SmtpTestRule create(SmtpServerConnectedType smtpServerConnectedType, Host cassandraHost) { - SmtpTestRule.ServerBuilder createJamesServer = (folder, dnsService) -> createJamesServer(cassandraHost, folder, dnsService); - - return new SmtpTestRule(smtpServerConnectedType, createJamesServer); - } - - private static GuiceJamesServer createJamesServer(Host cassandraHost, TemporaryFolder folder, DNSService dnsService) throws Exception { - Configuration configuration = Configuration.builder() - .workingDirectory(folder.newFolder()) - .configurationFromClasspath() - .build(); - - return GuiceJamesServer.forConfiguration(configuration) - .combineWith(CassandraJamesServerMain.CASSANDRA_SERVER_CORE_MODULE, - SmtpTestRule.SMTP_PROTOCOL_MODULE, - binder -> binder.bind(MailQueueItemDecoratorFactory.class).to(RawMailQueueItemDecoratorFactory.class), - binder -> binder.bind(CamelMailetContainerModule.DefaultProcessorsConfigurationSupplier.class) - .toInstance(DefaultConfigurationBuilder::new)) - .overrideWith( - new RabbitMQModule(), - new BlobStoreChoosingModule()) - .overrideWith( - new TestRabbitMQModule(DockerRabbitMQSingleton.SINGLETON), - new TestSwiftBlobStoreModule(), - binder -> binder.bind(ClusterConfiguration.class).toInstance( - ClusterConfiguration.builder() - .host(cassandraHost) - .keyspace("testing") - .replicationFactor(1) - .build()), - binder -> binder.bind(DNSService.class).toInstance(dnsService), - binder -> binder.bind(CleanupTasksPerformer.class).asEagerSingleton()); - } -} - diff --git a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQForwardSmtpTest.java b/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQForwardSmtpTest.java deleted file mode 100644 index dce21c6..0000000 --- a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQForwardSmtpTest.java +++ /dev/null @@ -1,40 +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.james.mpt.smtp; - -import static org.apache.james.modules.protocols.SmtpGuiceProbe.SmtpServerConnectedType.SMTP_GLOBAL_SERVER; - -import org.apache.james.backends.cassandra.DockerCassandraRule; -import org.junit.ClassRule; -import org.junit.Rule; - -public class SwiftRabbitMQForwardSmtpTest extends ForwardSmtpTest { - - @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule(); - - @Rule - public SmtpTestRule cassandraRabbitMQSwiftSmtpTestRule = CassandraRabbitMQSwiftSmtpTestRuleFactory.create(SMTP_GLOBAL_SERVER, cassandraServer.getHost()); - - @Override - protected SmtpHostSystem createSmtpHostSystem() { - return cassandraRabbitMQSwiftSmtpTestRule; - } - -} diff --git a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQSmtpStarttlsCommandTest.java b/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQSmtpStarttlsCommandTest.java deleted file mode 100644 index bc3aa4d..0000000 --- a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/SwiftRabbitMQSmtpStarttlsCommandTest.java +++ /dev/null @@ -1,40 +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.james.mpt.smtp; - -import static org.apache.james.modules.protocols.SmtpGuiceProbe.SmtpServerConnectedType.SMTP_START_TLS_SERVER; - -import org.apache.james.backends.cassandra.DockerCassandraRule; -import org.junit.ClassRule; -import org.junit.Rule; - -public class SwiftRabbitMQSmtpStarttlsCommandTest extends SmtpStarttlsCommandTest { - - @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule(); - - @Rule - public SmtpTestRule cassandraRabbitMQSwiftSmtpTestRule = CassandraRabbitMQSwiftSmtpTestRuleFactory.create(SMTP_START_TLS_SERVER, cassandraServer.getHost()); - - @Override - protected SmtpHostSystem createSmtpHostSystem() { - return cassandraRabbitMQSwiftSmtpTestRule; - } - -} diff --git a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/aws/s3/DockerAwsS3TestRule.java b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/aws/s3/DockerAwsS3TestRule.java index cb1fb5d..78c1ebf 100644 --- a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/aws/s3/DockerAwsS3TestRule.java +++ b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/aws/s3/DockerAwsS3TestRule.java @@ -118,7 +118,7 @@ public class DockerAwsS3TestRule implements GuiceModuleTestRule { .container(containerName) .authConfiguration(authConfiguration) .aesSalt("c603a7327ee3dcbc031d8d34b1096c605feca5e1") - .aesPassword("dockerAwsS3SwiftEncryption".toCharArray()) + .aesPassword("dockerAwsS3Encryption".toCharArray()) .build(); return binder -> { diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingConfigurationTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingConfigurationTest.java index fee6599..e224e99 100644 --- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingConfigurationTest.java +++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingConfigurationTest.java @@ -103,7 +103,7 @@ class BlobStoreChoosingConfigurationTest { } @Test - void fromShouldReturnConfigurationWhenBlobStoreImplIsSwift() { + void fromShouldReturnConfigurationWhenBlobStoreImplIsObjectStorage() { PropertiesConfiguration configuration = new PropertiesConfiguration(); configuration.addProperty("implementation", OBJECT_STORAGE); diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingModuleTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingModuleTest.java index 6dc472f..56871e5 100644 --- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingModuleTest.java +++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/modules/blobstore/BlobStoreChoosingModuleTest.java @@ -38,8 +38,8 @@ class BlobStoreChoosingModuleTest { private static CassandraBlobsDAO CASSANDRA_BLOBSTORE = mock(CassandraBlobsDAO.class); private static Provider<CassandraBlobsDAO> CASSANDRA_BLOBSTORE_PROVIDER = () -> CASSANDRA_BLOBSTORE; - private static ObjectStorageBlobsDAO SWIFT_BLOBSTORE = mock(ObjectStorageBlobsDAO.class); - private static Provider<ObjectStorageBlobsDAO> SWIFT_BLOBSTORE_PROVIDER = () -> SWIFT_BLOBSTORE; + private static ObjectStorageBlobsDAO OBJECT_STORAGE_BLOBSTORE = mock(ObjectStorageBlobsDAO.class); + private static Provider<ObjectStorageBlobsDAO> OBJECT_STORAGE_BLOBSTORE_PROVIDER = () -> OBJECT_STORAGE_BLOBSTORE; @Test void provideChoosingConfigurationShouldThrowWhenMissingPropertyField() { @@ -92,7 +92,7 @@ class BlobStoreChoosingModuleTest { } @Test - void provideChoosingConfigurationShouldReturnSwiftFactoryWhenConfigurationImplIsSwift() throws Exception { + void provideChoosingConfigurationShouldReturnObjectStorageFactoryWhenConfigurationImplIsObjectStorage() throws Exception { BlobStoreChoosingModule module = new BlobStoreChoosingModule(); PropertiesConfiguration configuration = new PropertiesConfiguration(); configuration.addProperty("implementation", BlobStoreImplName.OBJECTSTORAGE.getName()); @@ -135,16 +135,16 @@ class BlobStoreChoosingModuleTest { BlobStoreChoosingModule module = new BlobStoreChoosingModule(); assertThat(module.provideBlobStore(BlobStoreChoosingConfiguration.cassandra(), - CASSANDRA_BLOBSTORE_PROVIDER, SWIFT_BLOBSTORE_PROVIDER)) + CASSANDRA_BLOBSTORE_PROVIDER, OBJECT_STORAGE_BLOBSTORE_PROVIDER)) .isEqualTo(CASSANDRA_BLOBSTORE); } @Test - void provideBlobStoreShouldReturnSwiftBlobStoreWhenSwiftConfigured() { + void provideBlobStoreShouldReturnObjectStoreBlobStoreWhenObjectStoreConfigured() { BlobStoreChoosingModule module = new BlobStoreChoosingModule(); assertThat(module.provideBlobStore(BlobStoreChoosingConfiguration.cassandra(), - CASSANDRA_BLOBSTORE_PROVIDER, SWIFT_BLOBSTORE_PROVIDER)) + CASSANDRA_BLOBSTORE_PROVIDER, OBJECT_STORAGE_BLOBSTORE_PROVIDER)) .isEqualTo(CASSANDRA_BLOBSTORE); } @@ -153,7 +153,7 @@ class BlobStoreChoosingModuleTest { BlobStoreChoosingModule module = new BlobStoreChoosingModule(); assertThat(module.provideBlobStore(BlobStoreChoosingConfiguration.union(), - CASSANDRA_BLOBSTORE_PROVIDER, SWIFT_BLOBSTORE_PROVIDER)) + CASSANDRA_BLOBSTORE_PROVIDER, OBJECT_STORAGE_BLOBSTORE_PROVIDER)) .isInstanceOf(UnionBlobStore.class); } } \ No newline at end of file diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CucumberSwiftSingleton.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CucumberSwiftSingleton.java deleted file mode 100644 index 7af9ec8..0000000 --- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CucumberSwiftSingleton.java +++ /dev/null @@ -1,28 +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.james.jmap.cassandra.cucumber; - -import org.apache.james.modules.objectstorage.PayloadCodecFactory; -import org.apache.james.modules.objectstorage.swift.DockerSwiftTestRule; - -public class CucumberSwiftSingleton { - - public static DockerSwiftTestRule swiftServer = new DockerSwiftTestRule(); - public static DockerSwiftTestRule encryptedSwiftServer = new DockerSwiftTestRule(PayloadCodecFactory.AES256); -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQDeletedMessagesVaultTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQDeletedMessagesVaultTest.java index 30f0a3a..45cc6f3 100644 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQDeletedMessagesVaultTest.java +++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQDeletedMessagesVaultTest.java @@ -21,7 +21,7 @@ package org.apache.james.jmap.rabbitmq; import java.io.IOException; -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; +import org.apache.james.CassandraRabbitMQAwsS3JmapTestRule; import org.apache.james.DockerCassandraRule; import org.apache.james.GuiceJamesServer; import org.apache.james.filesystem.api.FileSystem; @@ -40,7 +40,7 @@ public class RabbitMQDeletedMessagesVaultTest extends DeletedMessagesVaultTest { public static DockerCassandraRule cassandra = new DockerCassandraRule(); @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); + public CassandraRabbitMQAwsS3JmapTestRule rule = CassandraRabbitMQAwsS3JmapTestRule.defaultTestRule(); @Override protected GuiceJamesServer createJmapServer(FileSystem fileSystem) throws IOException { diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftForwardIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftForwardIntegrationTest.java deleted file mode 100644 index 1394824..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftForwardIntegrationTest.java +++ /dev/null @@ -1,47 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.ForwardIntegrationTest; -import org.apache.james.webadmin.WebAdminConfiguration; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftForwardIntegrationTest extends ForwardIntegrationTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule(), - binder -> binder.bind(WebAdminConfiguration.class) - .toInstance(WebAdminConfiguration.TEST_CONFIGURATION)); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMailboxesMethodTest.java deleted file mode 100644 index 865de0e..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMailboxesMethodTest.java +++ /dev/null @@ -1,44 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.GetMailboxesMethodTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftGetMailboxesMethodTest extends GetMailboxesMethodTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMessageListMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMessageListMethodTest.java deleted file mode 100644 index e43ea26..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetMessageListMethodTest.java +++ /dev/null @@ -1,50 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.GetMessageListMethodTest; -import org.apache.james.modules.TestJMAPServerModule; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftGetMessageListMethodTest extends GetMessageListMethodTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule(), - new TestJMAPServerModule(LIMIT_TO_3_MESSAGES)); - } - - @Override - protected void await() { - rule.await(); - } -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetVacationResponseTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetVacationResponseTest.java deleted file mode 100644 index 1605e8d..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftGetVacationResponseTest.java +++ /dev/null @@ -1,50 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.GetVacationResponseTest; -import org.apache.james.util.date.ZonedDateTimeProvider; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftGetVacationResponseTest extends GetVacationResponseTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer(ZonedDateTimeProvider zonedDateTimeProvider) throws IOException { - return rule.jmapServer(cassandra.getModule()) - .overrideWith(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider)); - } - - @Override - protected void await() { - rule.await(); - } -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftJmapAuthenticationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftJmapAuthenticationTest.java deleted file mode 100644 index ac77b8f..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftJmapAuthenticationTest.java +++ /dev/null @@ -1,46 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.FixedDateZonedDateTimeProvider; -import org.apache.james.jmap.JMAPAuthenticationTest; -import org.apache.james.util.date.ZonedDateTimeProvider; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftJmapAuthenticationTest extends JMAPAuthenticationTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer(FixedDateZonedDateTimeProvider zonedDateTimeProvider) throws IOException { - return rule.jmapServer(cassandra.getModule()) - .overrideWith(binder -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider)); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftProvisioningTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftProvisioningTest.java deleted file mode 100644 index 8fb5797..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftProvisioningTest.java +++ /dev/null @@ -1,44 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.ProvisioningTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftProvisioningTest extends ProvisioningTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftQuotaMailingTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftQuotaMailingTest.java deleted file mode 100644 index bc3c8d7..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftQuotaMailingTest.java +++ /dev/null @@ -1,42 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.QuotaMailingTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftQuotaMailingTest extends QuotaMailingTest { - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSendMDNMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSendMDNMethodTest.java deleted file mode 100644 index 3483d3e..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSendMDNMethodTest.java +++ /dev/null @@ -1,59 +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.james.jmap.rabbitmq; - -import org.apache.james.CassandraExtension; -import org.apache.james.CassandraRabbitMQJamesServerMain; -import org.apache.james.EmbeddedElasticSearchExtension; -import org.apache.james.GuiceJamesServer; -import org.apache.james.JamesServerBuilder; -import org.apache.james.JamesServerExtension; -import org.apache.james.jmap.methods.integration.SendMDNMethodTest; -import org.apache.james.mailbox.cassandra.ids.CassandraMessageId; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.model.MessageId; -import org.apache.james.mailbox.store.search.PDFTextExtractor; -import org.apache.james.modules.RabbitMQExtension; -import org.apache.james.modules.SwiftBlobStoreExtension; -import org.apache.james.modules.TestJMAPServerModule; -import org.junit.jupiter.api.extension.RegisterExtension; - -public class RabbitMQSwiftSendMDNMethodTest extends SendMDNMethodTest { - - private static final long LIMIT_TO_10_MESSAGES = 10; - - @RegisterExtension - JamesServerExtension testExtension = new JamesServerBuilder() - .extension(new EmbeddedElasticSearchExtension()) - .extension(new CassandraExtension()) - .extension(new SwiftBlobStoreExtension()) - .extension(new RabbitMQExtension()) - .server(configuration -> GuiceJamesServer.forConfiguration(configuration) - .combineWith(CassandraRabbitMQJamesServerMain.MODULES) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) - .overrideWith(new TestJMAPServerModule(LIMIT_TO_10_MESSAGES))) - .build(); - - @Override - protected MessageId randomMessageId() { - return new CassandraMessageId.Factory().generate(); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMailboxesMethodTest.java deleted file mode 100644 index 29993bd..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMailboxesMethodTest.java +++ /dev/null @@ -1,49 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.SetMailboxesMethodTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftSetMailboxesMethodTest extends SetMailboxesMethodTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - - @Override - protected void await() { - rule.await(); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMessagesMethodTest.java deleted file mode 100644 index 0e38006..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetMessagesMethodTest.java +++ /dev/null @@ -1,65 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.SetMessagesMethodTest; -import org.apache.james.mailbox.cassandra.ids.CassandraMessageId; -import org.apache.james.mailbox.model.MessageId; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; - -public class RabbitMQSwiftSetMessagesMethodTest extends SetMessagesMethodTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - - @Override - protected void await() { - rule.await(); - } - - @Override - protected MessageId randomMessageId() { - return new CassandraMessageId.Factory().generate(); - } - - - @Ignore("Temporally ignored CI failing test") - @Override - @Test - public void setMessagesWithABigBodyShouldReturnCreatedMessageWhenSendingMessage() { - - } -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetVacationResponseTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetVacationResponseTest.java deleted file mode 100644 index b7d44a2..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSetVacationResponseTest.java +++ /dev/null @@ -1,49 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.methods.integration.SetVacationResponseTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftSetVacationResponseTest extends SetVacationResponseTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - - @Override - protected void await() { - rule.await(); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSpamAssassinContractTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSpamAssassinContractTest.java deleted file mode 100644 index c1bc8be..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftSpamAssassinContractTest.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.james.jmap.rabbitmq; - -import org.apache.james.CassandraExtension; -import org.apache.james.CassandraRabbitMQJamesServerMain; -import org.apache.james.EmbeddedElasticSearchExtension; -import org.apache.james.GuiceJamesServer; -import org.apache.james.JamesServerBuilder; -import org.apache.james.JamesServerExtension; -import org.apache.james.jmap.methods.integration.SpamAssassinContract; -import org.apache.james.jmap.methods.integration.SpamAssassinModuleExtension; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; -import org.apache.james.modules.RabbitMQExtension; -import org.apache.james.modules.SwiftBlobStoreExtension; -import org.apache.james.modules.TestJMAPServerModule; -import org.junit.jupiter.api.extension.RegisterExtension; - -class RabbitMQSwiftSpamAssassinContractTest implements SpamAssassinContract { - - private static final int LIMIT_TO_20_MESSAGES = 20; - - private static final SpamAssassinModuleExtension spamAssassinExtension = new SpamAssassinModuleExtension(); - @RegisterExtension - static JamesServerExtension testExtension = new JamesServerBuilder() - .extension(new EmbeddedElasticSearchExtension()) - .extension(new CassandraExtension()) - .extension(new RabbitMQExtension()) - .extension(new SwiftBlobStoreExtension()) - .extension(spamAssassinExtension) - .server(configuration -> GuiceJamesServer.forConfiguration(configuration) - .combineWith(CassandraRabbitMQJamesServerMain.MODULES) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) - .overrideWith(new TestJMAPServerModule(LIMIT_TO_20_MESSAGES))) - .build(); -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationIntegrationTest.java deleted file mode 100644 index 505beb0..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationIntegrationTest.java +++ /dev/null @@ -1,49 +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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.jmap.VacationIntegrationTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftVacationIntegrationTest extends VacationIntegrationTest { - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer createJmapServer() throws IOException { - return rule.jmapServer(cassandra.getModule()); - } - - @Override - protected void await() { - rule.await(); - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationRelayIntegrationTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationRelayIntegrationTest.java deleted file mode 100644 index def1a31..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/RabbitMQSwiftVacationRelayIntegrationTest.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.james.jmap.rabbitmq; - -import java.io.IOException; - -import org.apache.james.CassandraRabbitMQSwiftJmapTestRule; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.dnsservice.api.DNSService; -import org.apache.james.dnsservice.api.InMemoryDNSService; -import org.apache.james.jmap.VacationRelayIntegrationTest; -import org.junit.ClassRule; -import org.junit.Rule; - -public class RabbitMQSwiftVacationRelayIntegrationTest extends VacationRelayIntegrationTest { - - private final InMemoryDNSService inMemoryDNSService = new InMemoryDNSService(); - - @ClassRule - public static DockerCassandraRule cassandra = new DockerCassandraRule(); - - @Rule - public CassandraRabbitMQSwiftJmapTestRule rule = CassandraRabbitMQSwiftJmapTestRule.defaultTestRule(); - - @Override - protected GuiceJamesServer getJmapServer() throws IOException { - return rule.jmapServer( - cassandra.getModule(), - (binder) -> binder.bind(DNSService.class).toInstance(inMemoryDNSService)); - } - - @Override - protected void await() { - rule.await(); - } - - @Override - protected InMemoryDNSService getInMemoryDns() { - return inMemoryDNSService; - } - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/ReindexingWithEventDeadLettersTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/ReindexingWithEventDeadLettersTest.java index 960e618..b1e2c85 100644 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/ReindexingWithEventDeadLettersTest.java +++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/ReindexingWithEventDeadLettersTest.java @@ -43,8 +43,8 @@ import org.apache.james.JamesServerBuilder; import org.apache.james.JamesServerExtension; import org.apache.james.JmapJamesServerContract; import org.apache.james.jmap.api.access.AccessToken; +import org.apache.james.modules.AwsS3BlobStoreExtension; import org.apache.james.modules.RabbitMQExtension; -import org.apache.james.modules.SwiftBlobStoreExtension; import org.apache.james.modules.TestJMAPServerModule; import org.apache.james.modules.objectstorage.PayloadCodecFactory; import org.apache.james.util.docker.DockerGenericContainer; @@ -91,7 +91,7 @@ class ReindexingWithEventDeadLettersTest { .extension(new DockerElasticSearchExtension(elasticSearchContainer)) .extension(new CassandraExtension()) .extension(new RabbitMQExtension()) - .extension(new SwiftBlobStoreExtension(PayloadCodecFactory.AES256)) + .extension(new AwsS3BlobStoreExtension(PayloadCodecFactory.AES256)) .server(CONFIGURATION_BUILDER) .build(); diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberCassandraSingleton.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberCassandraSingleton.java deleted file mode 100644 index b476acc..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberCassandraSingleton.java +++ /dev/null @@ -1,27 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.DockerCassandraRule; - -class CucumberCassandraSingleton { - - static DockerCassandraRule cassandraServer = new DockerCassandraRule(); - -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberRabbitMQSingleton.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberRabbitMQSingleton.java deleted file mode 100644 index c56063d..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberRabbitMQSingleton.java +++ /dev/null @@ -1,26 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.modules.DockerRabbitMQRule; - -class CucumberRabbitMQSingleton { - - static DockerRabbitMQRule rabbitMQServer = new DockerRabbitMQRule(); -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberSwiftSingleton.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberSwiftSingleton.java deleted file mode 100644 index adbf651..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/CucumberSwiftSingleton.java +++ /dev/null @@ -1,28 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.modules.objectstorage.PayloadCodecFactory; -import org.apache.james.modules.objectstorage.swift.DockerSwiftTestRule; - -public class CucumberSwiftSingleton { - - public static DockerSwiftTestRule swiftServer = new DockerSwiftTestRule(); - public static DockerSwiftTestRule encryptedSwiftServer = new DockerSwiftTestRule(PayloadCodecFactory.AES256); -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQDownloadCucumberTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQDownloadCucumberTest.java deleted file mode 100644 index 2af6f4e..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQDownloadCucumberTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = {"classpath:cucumber/DownloadEndpoint.feature", "classpath:cucumber/DownloadGet.feature", "classpath:cucumber/DownloadPost.feature"}, - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQDownloadCucumberTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQGetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQGetMessagesMethodTest.java deleted file mode 100644 index 281e638..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQGetMessagesMethodTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = "classpath:cucumber/GetMessages.feature", - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQGetMessagesMethodTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPKeywordsInconsistenciesTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPKeywordsInconsistenciesTest.java deleted file mode 100644 index df9b64f..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPKeywordsInconsistenciesTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = "classpath:cucumber/ImapKeywordsConsistency.feature", - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQIMAPKeywordsInconsistenciesTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPSetMessagesCompatibilityTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPSetMessagesCompatibilityTest.java deleted file mode 100644 index 2a64f07..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQIMAPSetMessagesCompatibilityTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = "classpath:cucumber/ImapSetMessagesMailboxesUpdatesCompatibility.feature", - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQIMAPSetMessagesCompatibilityTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMailboxSharingTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMailboxSharingTest.java deleted file mode 100644 index dfc49a8..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMailboxSharingTest.java +++ /dev/null @@ -1,43 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = { - "classpath:cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature", - "classpath:cucumber/sharing/SharingChildrenWithoutSharingParent.feature", - "classpath:cucumber/sharing/SharingMailboxWithOtherDomain.feature", - "classpath:cucumber/sharing/MailboxCreationAndSharing.feature", - "classpath:cucumber/sharing/MailboxDeletionAndSharing.feature", - "classpath:cucumber/sharing/MoveMailboxAndSharing.feature", - "classpath:cucumber/sharing/RenamingMailboxAndSharing.feature" }, - glue = { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift" }, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQMailboxSharingTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMessageSharingTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMessageSharingTest.java deleted file mode 100644 index b783e7a..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQMessageSharingTest.java +++ /dev/null @@ -1,44 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = { - "classpath:cucumber/sharing/GetMessageAndSharing.feature", - "classpath:cucumber/sharing/SetMessagesOnSharedMailbox.feature", - "classpath:cucumber/sharing/DownloadAndSharing.feature", - "classpath:cucumber/sharing/KeywordsConsistencyOnDelegationMailbox.feature", - "classpath:cucumber/sharing/GetMessageListAndSharing.feature", - "classpath:cucumber/sharing/MoveMessageAndSharing.feature", - "classpath:cucumber/sharing/SetFlagAndSharing.feature", - "classpath:cucumber/sharing/CopyAndSharing.feature" }, - glue = { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift" }, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQMessageSharingTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMailboxesMethodCucumberTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMailboxesMethodCucumberTest.java deleted file mode 100644 index 88fce78..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMailboxesMethodCucumberTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = { "classpath:cucumber/MailboxModification.feature", "classpath:cucumber/SetMailboxes.feature" }, - glue = { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift" }, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQSetMailboxesMethodCucumberTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMessagesMethodCucumberTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMessagesMethodCucumberTest.java deleted file mode 100644 index e4f8e61..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSetMessagesMethodCucumberTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = "classpath:cucumber/SetMessages.feature", - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQSetMessagesMethodCucumberTest { -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSwiftStepdefs.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSwiftStepdefs.java deleted file mode 100644 index a29ef21..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQSwiftStepdefs.java +++ /dev/null @@ -1,123 +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.james.jmap.rabbitmq.cucumber.swift; - -import java.util.Arrays; - -import javax.inject.Inject; - -import org.apache.activemq.store.PersistenceAdapter; -import org.apache.activemq.store.memory.MemoryPersistenceAdapter; -import org.apache.james.CassandraRabbitMQJamesServerMain; -import org.apache.james.CleanupTasksPerformer; -import org.apache.james.DockerCassandraRule; -import org.apache.james.GuiceJamesServer; -import org.apache.james.backends.es.EmbeddedElasticSearch; -import org.apache.james.jmap.methods.integration.cucumber.ImapStepdefs; -import org.apache.james.jmap.methods.integration.cucumber.MainStepdefs; -import org.apache.james.mailbox.cassandra.ids.CassandraMessageId; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.extractor.DefaultTextExtractor; -import org.apache.james.modules.DockerRabbitMQRule; -import org.apache.james.modules.TestESMetricReporterModule; -import org.apache.james.modules.TestElasticSearchModule; -import org.apache.james.modules.TestJMAPServerModule; -import org.apache.james.modules.TestRabbitMQModule; -import org.apache.james.modules.TestSwiftBlobStoreModule; -import org.apache.james.modules.objectstorage.swift.DockerSwiftTestRule; -import org.apache.james.server.CassandraTruncateTableTask; -import org.apache.james.server.core.configuration.Configuration; -import org.junit.rules.TemporaryFolder; - -import com.github.fge.lambdas.runnable.ThrowingRunnable; -import com.google.inject.multibindings.Multibinder; - -import cucumber.api.java.After; -import cucumber.api.java.Before; -import cucumber.runtime.java.guice.ScenarioScoped; - -@ScenarioScoped -public class RabbitMQSwiftStepdefs { - - private final MainStepdefs mainStepdefs; - private final ImapStepdefs imapStepdefs; - private TemporaryFolder temporaryFolder = new TemporaryFolder(); - private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(temporaryFolder); - private DockerCassandraRule cassandraServer = CucumberCassandraSingleton.cassandraServer; - private DockerRabbitMQRule rabbitMQServer = CucumberRabbitMQSingleton.rabbitMQServer; - private DockerSwiftTestRule swiftServer = CucumberSwiftSingleton.swiftServer; - - @Inject - private RabbitMQSwiftStepdefs(MainStepdefs mainStepdefs, ImapStepdefs imapStepdefs) { - this.mainStepdefs = mainStepdefs; - this.imapStepdefs = imapStepdefs; - } - - @Before - public void init() throws Exception { - cassandraServer.start(); - rabbitMQServer.start(); - swiftServer.start(); - - temporaryFolder.create(); - embeddedElasticSearch.before(); - mainStepdefs.messageIdFactory = new CassandraMessageId.Factory(); - Configuration configuration = Configuration.builder() - .workingDirectory(temporaryFolder.newFolder()) - .configurationFromClasspath() - .build(); - - mainStepdefs.jmapServer = GuiceJamesServer.forConfiguration(configuration) - .combineWith(CassandraRabbitMQJamesServerMain.MODULES) - .overrideWith(new TestJMAPServerModule(10)) - .overrideWith(new TestESMetricReporterModule()) - .overrideWith(new TestRabbitMQModule(rabbitMQServer.dockerRabbitMQ())) - .overrideWith(new TestSwiftBlobStoreModule()) - .overrideWith(new TestElasticSearchModule(embeddedElasticSearch)) - .overrideWith(cassandraServer.getModule()) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(DefaultTextExtractor.class)) - .overrideWith((binder) -> binder.bind(PersistenceAdapter.class).to(MemoryPersistenceAdapter.class)) - .overrideWith(binder -> Multibinder.newSetBinder(binder, CleanupTasksPerformer.CleanupTask.class).addBinding().to(CassandraTruncateTableTask.class)) - .overrideWith((binder -> binder.bind(CleanupTasksPerformer.class).asEagerSingleton())); - mainStepdefs.awaitMethod = () -> embeddedElasticSearch.awaitForElasticSearch(); - mainStepdefs.init(); - } - - @After - public void tearDown() { - ignoreFailures(imapStepdefs::closeConnections, - mainStepdefs::tearDown, - () -> embeddedElasticSearch.after(), - () -> temporaryFolder.delete()); - } - - private void ignoreFailures(ThrowingRunnable... cleaners) { - Arrays.stream(cleaners) - .forEach(this::runSwallowingException); - } - - private void runSwallowingException(Runnable run) { - try { - run.run(); - } catch (Exception e) { - // ignore - } - } -} diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQUploadCucumberTest.java b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQUploadCucumberTest.java deleted file mode 100644 index 047d74a..0000000 --- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/swift/RabbitMQUploadCucumberTest.java +++ /dev/null @@ -1,36 +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.james.jmap.rabbitmq.cucumber.swift; - -import org.apache.james.jmap.categories.EnableCucumber; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -@RunWith(Cucumber.class) -@CucumberOptions(features = {"classpath:cucumber/UploadEndpoint.feature"}, - glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.rabbitmq.cucumber.swift"}, - tags = {"not @Ignore", "@BasicFeature"}, - strict = true) -@Category(EnableCucumber.class) -public class RabbitMQUploadCucumberTest { -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
