You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/08/27 02:24:43 UTC
[james-project] 11/14: JAMES-3359 Simplify tests by applying
Mailbox/get property filtering
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 54d4e4a7c67c32242713ce20ded32f9429f164e7
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Aug 25 10:12:47 2020 +0700
JAMES-3359 Simplify tests by applying Mailbox/get property filtering
---
.../contract/MailboxSetMethodContract.scala | 262 +++------------------
1 file changed, 33 insertions(+), 229 deletions(-)
diff --git a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala
index 28f447e..79f9d7f 100644
--- a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala
+++ b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala
@@ -5098,6 +5098,7 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
+ | "properties": ["id", "rights"],
| "ids": ["${mailboxId.serialize()}"]
| },
| "c2"]
@@ -5134,25 +5135,6 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "name": "mailbox",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false,
- | "namespace": "Personal",
| "rights": {
| "${ANDRE.asString()}": ["l", "r"],
| "${DAVID.asString()}": ["l"]
@@ -5502,7 +5484,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5539,24 +5522,7 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${mailboxId.serialize()}",
| "name": "mailbox",
- | "parentId": "${parentId.serialize()}",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "parentId": "${parentId.serialize()}"
| }],
| "notFound": []
| }, "c2"]
@@ -5590,7 +5556,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5627,24 +5594,7 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${mailboxId.serialize()}",
| "name": "mailbox",
- | "parentId": "${newParentId.serialize()}",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "parentId": "${newParentId.serialize()}"
| }],
| "notFound": []
| }, "c2"]
@@ -5678,7 +5628,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5715,24 +5666,7 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${mailboxId.serialize()}",
| "name": "newName",
- | "parentId": "${parentId.serialize()}",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "parentId": "${parentId.serialize()}"
| }],
| "notFound": []
| }, "c2"]
@@ -5767,7 +5701,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5804,24 +5739,7 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${mailboxId.serialize()}",
| "name": "newName",
- | "parentId": "${newParentId.serialize()}",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "parentId": "${newParentId.serialize()}"
| }],
| "notFound": []
| }, "c2"]
@@ -5855,7 +5773,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5891,24 +5810,7 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "name": "mailbox",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "name": "mailbox"
| }],
| "notFound": []
| }, "c2"]
@@ -5942,7 +5844,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -5978,24 +5881,7 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "name": "newName",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "name": "newName"
| }],
| "notFound": []
| }, "c2"]
@@ -6030,7 +5916,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -6066,24 +5953,7 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "name": "newName",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "name": "newName"
| }],
| "notFound": []
| }, "c2"]
@@ -6115,7 +5985,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -6151,24 +6022,7 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "name": "mailbox",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "name": "mailbox"
| }],
| "notFound": []
| }, "c2"]
@@ -6202,7 +6056,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c2"]
| ]
@@ -6239,24 +6094,7 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${mailboxId.serialize()}",
| "parentId": "${parentId.serialize()}",
- | "name": "mailbox",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "name": "mailbox"
| }],
| "notFound": []
| }, "c2"]
@@ -6299,7 +6137,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${mailboxId.serialize()}"]
+ | "ids": ["${mailboxId.serialize()}"],
+ | "properties": ["id", "name", "parentId"]
| },
| "c3"
| ]
@@ -6366,26 +6205,8 @@ trait MailboxSetMethodContract {
| "state": "000001",
| "list": [{
| "id": "${mailboxId.serialize()}",
- | "sortOrder":1000,
| "name": "mailbox",
- | "parentId": "$parentId",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false
+ | "parentId": "$parentId"
| }],
| "notFound": []
| }, "c3"]
@@ -6895,7 +6716,8 @@ trait MailboxSetMethodContract {
| ["Mailbox/get",
| {
| "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
- | "ids": ["${parentId.serialize()}"]
+ | "ids": ["${parentId.serialize()}"],
+ | "properties": ["id", "name", "parentId", "rights"]
| },
| "c2"]
| ]
@@ -6932,24 +6754,6 @@ trait MailboxSetMethodContract {
| "list": [{
| "id": "${parentId.serialize()}",
| "name": "parent",
- | "sortOrder": 1000,
- | "totalEmails": 0,
- | "unreadEmails": 0,
- | "totalThreads": 0,
- | "unreadThreads": 0,
- | "myRights": {
- | "mayReadItems": true,
- | "mayAddItems": true,
- | "mayRemoveItems": true,
- | "maySetSeen": true,
- | "maySetKeywords": true,
- | "mayCreateChild": true,
- | "mayRename": true,
- | "mayDelete": true,
- | "maySubmit": true
- | },
- | "isSubscribed": false,
- | "namespace": "Personal",
| "rights": {
| "${ANDRE.asString()}": ["l"]
| }
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org