james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [19/22] james-project git commit: JAMES-2595 cucumber tests ontop RabbitMQ+Swift+Cassandra
Date Wed, 21 Nov 2018 10:07:29 GMT
JAMES-2595 cucumber tests ontop RabbitMQ+Swift+Cassandra


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/0a6a0605
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/0a6a0605
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/0a6a0605

Branch: refs/heads/master
Commit: 0a6a06056fae37c37ba892f960e6096efd8fed30
Parents: d0557b4
Author: tran tien duc <dtran@linagora.com>
Authored: Thu Nov 15 20:38:40 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Nov 21 16:50:21 2018 +0700

----------------------------------------------------------------------
 .../rabbitmq-jmap-integration-testing/pom.xml   |  15 +++
 .../cucumber/CucumberCassandraSingleton.java    |  27 ++++
 .../cucumber/CucumberRabbitMQSingleton.java     |  26 ++++
 .../cucumber/CucumberSwiftSingleton.java        |  28 +++++
 .../cucumber/RabbitMQDownloadCucumberTest.java  |  36 ++++++
 .../cucumber/RabbitMQGetMessagesMethodTest.java |  36 ++++++
 ...RabbitMQIMAPKeywordsInconsistenciesTest.java |  36 ++++++
 ...abbitMQIMAPSetMessagesCompatibilityTest.java |  36 ++++++
 .../cucumber/RabbitMQMailboxSharingTest.java    |  43 +++++++
 .../cucumber/RabbitMQMessageSharingTest.java    |  44 +++++++
 .../RabbitMQSetMailboxesMethodCucumberTest.java |  36 ++++++
 .../RabbitMQSetMessagesMethodCucumberTest.java  |  36 ++++++
 .../rabbitmq/cucumber/RabbitMQStepdefs.java     | 125 +++++++++++++++++++
 .../cucumber/RabbitMQUploadCucumberTest.java    |  36 ++++++
 14 files changed, 560 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
index a7a213d..f20a989 100644
--- a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/pom.xml
@@ -105,6 +105,21 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>io.cucumber</groupId>
+            <artifactId>cucumber-guice</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.cucumber</groupId>
+            <artifactId>cucumber-java</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.cucumber</groupId>
+            <artifactId>cucumber-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>io.rest-assured</groupId>
             <artifactId>rest-assured</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberCassandraSingleton.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberCassandraSingleton.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberCassandraSingleton.java
new file mode 100644
index 0000000..aabddd0
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberCassandraSingleton.java
@@ -0,0 +1,27 @@
+/****************************************************************
+ * 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;
+
+import org.apache.james.DockerCassandraRule;
+
+class CucumberCassandraSingleton {
+
+    static DockerCassandraRule cassandraServer = new DockerCassandraRule();
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberRabbitMQSingleton.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberRabbitMQSingleton.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberRabbitMQSingleton.java
new file mode 100644
index 0000000..2fe3b36
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberRabbitMQSingleton.java
@@ -0,0 +1,26 @@
+/****************************************************************
+ * 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;
+
+import org.apache.james.modules.DockerRabbitMQRule;
+
+class CucumberRabbitMQSingleton {
+
+    static DockerRabbitMQRule rabbitMQServer = new DockerRabbitMQRule();
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberSwiftSingleton.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberSwiftSingleton.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberSwiftSingleton.java
new file mode 100644
index 0000000..18b58ab
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/CucumberSwiftSingleton.java
@@ -0,0 +1,28 @@
+/****************************************************************
+ * 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;
+
+import org.apache.james.modules.objectstorage.PayloadCodecFactory;
+import org.apache.james.modules.objectstorage.guice.DockerSwiftTestRule;
+
+public class CucumberSwiftSingleton {
+
+    public static DockerSwiftTestRule swiftServer = new DockerSwiftTestRule();
+    public static DockerSwiftTestRule encryptedSwiftServer = new DockerSwiftTestRule(PayloadCodecFactory.AES256);
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQDownloadCucumberTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQDownloadCucumberTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQDownloadCucumberTest.java
new file mode 100644
index 0000000..0d26cd0
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQDownloadCucumberTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+                tags = {"not @Ignore", "@BasicFeature"},
+                strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQDownloadCucumberTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQGetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQGetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQGetMessagesMethodTest.java
new file mode 100644
index 0000000..eb5ea7d
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQGetMessagesMethodTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+                tags = {"not @Ignore", "@BasicFeature"},
+                strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQGetMessagesMethodTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPKeywordsInconsistenciesTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPKeywordsInconsistenciesTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPKeywordsInconsistenciesTest.java
new file mode 100644
index 0000000..08245c5
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPKeywordsInconsistenciesTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQIMAPKeywordsInconsistenciesTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPSetMessagesCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPSetMessagesCompatibilityTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPSetMessagesCompatibilityTest.java
new file mode 100644
index 0000000..a804f6c
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQIMAPSetMessagesCompatibilityTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQIMAPSetMessagesCompatibilityTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMailboxSharingTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMailboxSharingTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMailboxSharingTest.java
new file mode 100644
index 0000000..0a03890
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMailboxSharingTest.java
@@ -0,0 +1,43 @@
+/****************************************************************
+ * 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;
+
+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"
},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQMailboxSharingTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMessageSharingTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMessageSharingTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMessageSharingTest.java
new file mode 100644
index 0000000..4dca94f
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQMessageSharingTest.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * 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;
+
+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"
},
+    tags = {"not @Ignore", "@BasicFeature"},
+    strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQMessageSharingTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMailboxesMethodCucumberTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMailboxesMethodCucumberTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMailboxesMethodCucumberTest.java
new file mode 100644
index 0000000..07283aa
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMailboxesMethodCucumberTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"
},
+                tags = {"not @Ignore", "@BasicFeature"},
+                strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQSetMailboxesMethodCucumberTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMessagesMethodCucumberTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMessagesMethodCucumberTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMessagesMethodCucumberTest.java
new file mode 100644
index 0000000..3b7d04c
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQSetMessagesMethodCucumberTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+                tags = {"not @Ignore", "@BasicFeature"},
+                strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQSetMessagesMethodCucumberTest {
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQStepdefs.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQStepdefs.java
new file mode 100644
index 0000000..088c72b
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQStepdefs.java
@@ -0,0 +1,125 @@
+/****************************************************************
+ * 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;
+
+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.blobstore.BlobStoreChoosingConfiguration;
+import org.apache.james.modules.objectstorage.guice.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 RabbitMQStepdefs {
+
+    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 RabbitMQStepdefs(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(binder -> binder.bind(BlobStoreChoosingConfiguration.class)
+                .toInstance(BlobStoreChoosingConfiguration.objectStorage()))
+            .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));
+        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
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/0a6a0605/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQUploadCucumberTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQUploadCucumberTest.java
b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQUploadCucumberTest.java
new file mode 100644
index 0000000..bdeff9f
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/java/org/apache/james/jmap/rabbitmq/cucumber/RabbitMQUploadCucumberTest.java
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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;
+
+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"},
+                tags = {"not @Ignore", "@BasicFeature"},
+                strict = true)
+@Category(EnableCucumber.class)
+public class RabbitMQUploadCucumberTest {
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message