You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/05/09 10:28:38 UTC

[james-project] 13/14: JAMES-2712 Extract matching query for export and restore the vault to Linshare fixture

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 762d658f0da89f6dc617a68d94d72b49c770dfda
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Thu May 2 15:30:39 2019 +0700

    JAMES-2712 Extract matching query for export and restore the vault to Linshare fixture
---
 .../james/jmap/methods/integration/DeletedMessagesVaultTest.java     | 5 +----
 .../integration/LinshareBlobExportMechanismIntegrationTest.java      | 5 +----
 .../src/test/java/org/apache/james/linshare/LinshareFixture.java     | 4 ++++
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/DeletedMessagesVaultTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/DeletedMessagesVaultTest.java
index 60faec2..4c05393 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/DeletedMessagesVaultTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/DeletedMessagesVaultTest.java
@@ -37,6 +37,7 @@ import static org.apache.james.jmap.TestingConstants.DOMAIN;
 import static org.apache.james.jmap.TestingConstants.LOCALHOST_IP;
 import static org.apache.james.jmap.TestingConstants.calmlyAwait;
 import static org.apache.james.jmap.TestingConstants.jmapRequestSpecBuilder;
+import static org.apache.james.linshare.LinshareFixture.MATCH_ALL_QUERY;
 import static org.apache.james.mailbox.backup.ZipAssert.EntryChecks.hasName;
 import static org.apache.james.mailbox.backup.ZipAssert.assertThatZip;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -98,10 +99,6 @@ public abstract class DeletedMessagesVaultTest {
     private static final ConditionFactory WAIT_TWO_MINUTES = calmlyAwait.atMost(Duration.TWO_MINUTES);
     private static final String SUBJECT = "This mail will be restored from the vault!!";
     private static final String MAILBOX_NAME = "toBeDeleted";
-    private static final String MATCH_ALL_QUERY = "{" +
-        "\"combinator\": \"and\"," +
-        "\"criteria\": []" +
-        "}";
     private static final ExportRequest EXPORT_ALL_HOMER_MESSAGES_TO_BART = ExportRequest
         .userExportFrom(HOMER)
         .exportTo(BART)
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/LinshareBlobExportMechanismIntegrationTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/LinshareBlobExportMechanismIntegrationTest.java
index 8e6c704..b5c0004 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/LinshareBlobExportMechanismIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/LinshareBlobExportMechanismIntegrationTest.java
@@ -32,6 +32,7 @@ import static org.apache.james.jmap.TestingConstants.DOMAIN;
 import static org.apache.james.jmap.TestingConstants.LOCALHOST_IP;
 import static org.apache.james.jmap.TestingConstants.calmlyAwait;
 import static org.apache.james.jmap.TestingConstants.jmapRequestSpecBuilder;
+import static org.apache.james.linshare.LinshareFixture.MATCH_ALL_QUERY;
 import static org.apache.james.linshare.LinshareFixture.USER_1;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.hamcrest.Matchers.containsString;
@@ -72,10 +73,6 @@ public abstract class LinshareBlobExportMechanismIntegrationTest {
     private static final String BART_PASSWORD = "bartPassword";
     private static final ConditionFactory WAIT_TEN_SECONDS = calmlyAwait.atMost(Duration.TEN_SECONDS);
     private static final String SUBJECT = "This mail will be restored from the vault!!";
-    private static final String MATCH_ALL_QUERY = "{" +
-        "\"combinator\": \"and\"," +
-        "\"criteria\": []" +
-        "}";
     private static final ExportRequest EXPORT_ALL_HOMER_MESSAGES_TO_USER_1 = ExportRequest
         .userExportFrom(HOMER)
         .exportTo(USER_1.getUsername())
diff --git a/third-party/linshare/src/test/java/org/apache/james/linshare/LinshareFixture.java b/third-party/linshare/src/test/java/org/apache/james/linshare/LinshareFixture.java
index 9d53133..a47e409 100644
--- a/third-party/linshare/src/test/java/org/apache/james/linshare/LinshareFixture.java
+++ b/third-party/linshare/src/test/java/org/apache/james/linshare/LinshareFixture.java
@@ -80,4 +80,8 @@ public interface LinshareFixture {
     Map<String, Credential> USER_CREDENTIAL_MAP = USER_CREDENTIALS.stream()
         .collect(Guavate.toImmutableMap(Credential::getUsername, Function.identity()));
 
+    String MATCH_ALL_QUERY = "{" +
+        "\"combinator\": \"and\"," +
+        "\"criteria\": []" +
+        "}";
 }


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