Fix JMAP tests
This commit is contained in:
193
Cargo.lock
generated
193
Cargo.lock
generated
@@ -362,7 +362,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"url",
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -703,9 +703,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
version = "1.0.1"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
|
||||
checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837"
|
||||
dependencies = [
|
||||
"funty",
|
||||
"radium",
|
||||
@@ -957,9 +957,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.11.1"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
||||
checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -2819,17 +2819,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
||||
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"rand_core 0.10.1",
|
||||
"wasip2",
|
||||
"wasip3",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
@@ -3356,7 +3354,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tower-service",
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3516,12 +3514,6 @@ dependencies = [
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "id-arena"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
|
||||
|
||||
[[package]]
|
||||
name = "idea"
|
||||
version = "0.5.1"
|
||||
@@ -3860,9 +3852,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jmap-client"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3357aac1ef357587e09f44262f351f7773120fb695e281b34628ef9d84028038"
|
||||
checksum = "4deab22e057d24e32122f0fc6e2d667a124fdd6a0d8ef3ed4f8a89923c11084f"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"async-stream",
|
||||
@@ -4158,12 +4150,6 @@ dependencies = [
|
||||
"x509-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leb128fmt"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
|
||||
|
||||
[[package]]
|
||||
name = "libbz2-rs-sys"
|
||||
version = "0.2.5"
|
||||
@@ -6059,7 +6045,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
|
||||
dependencies = [
|
||||
"chacha20",
|
||||
"getrandom 0.4.2",
|
||||
"getrandom 0.4.3",
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
|
||||
@@ -6432,7 +6418,7 @@ dependencies = [
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams 0.4.2",
|
||||
"web-sys",
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7901,9 +7887,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.117"
|
||||
version = "2.0.118"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||
checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -8929,7 +8915,7 @@ version = "1.23.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7"
|
||||
dependencies = [
|
||||
"getrandom 0.4.2",
|
||||
"getrandom 0.4.3",
|
||||
"js-sys",
|
||||
"serde_core",
|
||||
"sha1_smol",
|
||||
@@ -9042,16 +9028,7 @@ version = "1.0.4+wasi-0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
|
||||
dependencies = [
|
||||
"wit-bindgen 0.57.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasip3"
|
||||
version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
|
||||
dependencies = [
|
||||
"wit-bindgen 0.51.0",
|
||||
"wit-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -9118,28 +9095,6 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-encoder"
|
||||
version = "0.244.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
|
||||
dependencies = [
|
||||
"leb128fmt",
|
||||
"wasmparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-metadata"
|
||||
version = "0.244.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 2.14.0",
|
||||
"wasm-encoder",
|
||||
"wasmparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-streams"
|
||||
version = "0.4.2"
|
||||
@@ -9166,18 +9121,6 @@ dependencies = [
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmparser"
|
||||
version = "0.244.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.15.5",
|
||||
"indexmap 2.14.0",
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.102"
|
||||
@@ -9200,9 +9143,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webpki-root-certs"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c"
|
||||
checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
@@ -9213,14 +9156,14 @@ version = "0.26.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
||||
dependencies = [
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d"
|
||||
checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
@@ -9674,100 +9617,12 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
||||
dependencies = [
|
||||
"wit-bindgen-rust-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.57.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-core"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"heck",
|
||||
"wit-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rust"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"heck",
|
||||
"indexmap 2.14.0",
|
||||
"prettyplease",
|
||||
"syn",
|
||||
"wasm-metadata",
|
||||
"wit-bindgen-core",
|
||||
"wit-component",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rust-macro"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wit-bindgen-core",
|
||||
"wit-bindgen-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-component"
|
||||
version = "0.244.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags",
|
||||
"indexmap 2.14.0",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"wasm-encoder",
|
||||
"wasm-metadata",
|
||||
"wasmparser",
|
||||
"wit-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-parser"
|
||||
version = "0.244.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"id-arena",
|
||||
"indexmap 2.14.0",
|
||||
"log",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"unicode-xid",
|
||||
"wasmparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.6.3"
|
||||
@@ -10071,7 +9926,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
"x509-parser",
|
||||
"zenoh-buffers",
|
||||
"zenoh-codec",
|
||||
@@ -10155,7 +10010,7 @@ dependencies = [
|
||||
"tokio-rustls",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"webpki-roots 1.0.7",
|
||||
"webpki-roots 1.0.8",
|
||||
"x509-parser",
|
||||
"zenoh-config",
|
||||
"zenoh-core",
|
||||
@@ -10455,7 +10310,7 @@ dependencies = [
|
||||
"crc32fast",
|
||||
"deflate64",
|
||||
"flate2",
|
||||
"getrandom 0.4.2",
|
||||
"getrandom 0.4.3",
|
||||
"hmac 0.13.0",
|
||||
"indexmap 2.14.0",
|
||||
"lzma-rust2",
|
||||
|
||||
@@ -50,7 +50,7 @@ mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
|
||||
mail-builder = "0.4.4"
|
||||
sieve-rs = { version = "0.7", features = ["rkyv"] }
|
||||
utils = { path = "../crates/utils", features = ["test_mode"] }
|
||||
jmap-client = { version = "0.4", features = ["websockets", "debug", "async"] }
|
||||
jmap-client = { version = "0.4", features = ["websockets", "debug", "async"] }
|
||||
tokio = { version = "1.47", features = ["full"] }
|
||||
tokio-rustls = { version = "0.26", default-features = false, features = ["aws_lc_rs", "tls12"] }
|
||||
rustls = { version = "0.23.5", default-features = false, features = ["std", "aws_lc_rs", "tls12"] }
|
||||
|
||||
@@ -46,7 +46,7 @@ pub async fn test(test: &TestServer) {
|
||||
"name": "Stalwart Calendar (jdoe@example.com)",
|
||||
"description": null,
|
||||
"sortOrder": 0,
|
||||
"isSubscribed": false,
|
||||
"isSubscribed": true,
|
||||
"isDefault": true,
|
||||
"color": null,
|
||||
"timeZone": null,
|
||||
@@ -311,7 +311,7 @@ pub async fn test(test: &TestServer) {
|
||||
"name": "Stalwart Calendar (jdoe@example.com)",
|
||||
"description": (),
|
||||
"sortOrder": 0,
|
||||
"isSubscribed": false,
|
||||
"isSubscribed": true,
|
||||
"isDefault": false,
|
||||
"color": null,
|
||||
"timeZone": null,
|
||||
|
||||
@@ -217,6 +217,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"CalendarEvent/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"properties": ["id", "title", "recurrenceOverrides", "participants"],
|
||||
"ids": [&event_2_id, &event_3_id],
|
||||
"recurrenceOverridesBefore": "2006-01-07T00:00:00Z",
|
||||
@@ -577,6 +578,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"ical": {
|
||||
"data": [
|
||||
@@ -609,6 +611,7 @@ END:VCALENDAR
|
||||
[
|
||||
"CalendarEvent/parse",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"blobIds": [
|
||||
"#ical"
|
||||
]
|
||||
|
||||
@@ -39,7 +39,7 @@ pub async fn test(test: &TestServer) {
|
||||
"name": "Stalwart Address Book (jdoe@example.com)",
|
||||
"description": (),
|
||||
"sortOrder": 0,
|
||||
"isSubscribed": false,
|
||||
"isSubscribed": true,
|
||||
"isDefault": true,
|
||||
"id": default_addressbook_id,
|
||||
})
|
||||
@@ -149,7 +149,7 @@ pub async fn test(test: &TestServer) {
|
||||
"name": "Stalwart Address Book (jdoe@example.com)",
|
||||
"description": (),
|
||||
"sortOrder": 0,
|
||||
"isSubscribed": false,
|
||||
"isSubscribed": true,
|
||||
"isDefault": false,
|
||||
"id": default_addressbook_id,
|
||||
})
|
||||
|
||||
@@ -370,6 +370,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"vcard": {
|
||||
"data": [
|
||||
@@ -390,6 +391,7 @@ END:VCARD"#
|
||||
[
|
||||
"ContactCard/parse",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"blobIds": [
|
||||
"#vcard"
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ pub async fn test(test: &TestServer) {
|
||||
|
||||
// Blob/set simple test
|
||||
let response = account.jmap_method_call("Blob/upload", json!({
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"abc": {
|
||||
"data" : [
|
||||
@@ -52,6 +53,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_call(
|
||||
"Blob/upload",
|
||||
json!({
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"abc": {
|
||||
"data" : [
|
||||
@@ -73,6 +75,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"ids" : [
|
||||
blob_id
|
||||
],
|
||||
@@ -87,6 +90,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"ids" : [
|
||||
blob_id
|
||||
],
|
||||
@@ -146,6 +150,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"b4": {
|
||||
"data": [
|
||||
@@ -161,6 +166,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"cat": {
|
||||
"data": [
|
||||
@@ -192,6 +198,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"properties": [
|
||||
"data:asText",
|
||||
"size"
|
||||
@@ -232,6 +239,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"b1": {
|
||||
"data": [
|
||||
@@ -255,6 +263,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"ids": [
|
||||
"#b1",
|
||||
"#b2"
|
||||
@@ -265,6 +274,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"ids": [
|
||||
"#b1",
|
||||
"#b2"
|
||||
@@ -279,6 +289,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"ids": [
|
||||
"#b1",
|
||||
"#b2"
|
||||
@@ -293,6 +304,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"offset": 0,
|
||||
"length": 5,
|
||||
"ids": [
|
||||
@@ -305,6 +317,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/get",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"offset": 20,
|
||||
"length": 100,
|
||||
"ids": [
|
||||
@@ -380,6 +393,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_call(
|
||||
"Blob/lookup",
|
||||
json!({
|
||||
"accountId": account.id_string(),
|
||||
"typeNames": [
|
||||
"Mailbox",
|
||||
"Thread",
|
||||
|
||||
@@ -45,7 +45,7 @@ pub async fn test(test: &TestServer) {
|
||||
ece_roundtrip();
|
||||
|
||||
// Create test account
|
||||
let account = test.account("jdoe@example.com");
|
||||
let account = test.account("robert@example.com");
|
||||
let client = account.jmap_client().await;
|
||||
|
||||
// Create channels
|
||||
|
||||
@@ -104,6 +104,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"Blob/upload",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"hello": {
|
||||
"data": [
|
||||
@@ -119,6 +120,7 @@ pub async fn test(test: &TestServer) {
|
||||
[
|
||||
"FileNode/set",
|
||||
{
|
||||
"accountId": account.id_string(),
|
||||
"create": {
|
||||
"i0": {
|
||||
"name": "hello.txt",
|
||||
|
||||
@@ -222,7 +222,7 @@ pub async fn test(test: &TestServer) {
|
||||
matches!(
|
||||
result,
|
||||
Err(Error::Set(SetError {
|
||||
type_: SetErrorType::InvalidProperties,
|
||||
type_: SetErrorType::AlreadyExists,
|
||||
..
|
||||
}))
|
||||
),
|
||||
|
||||
@@ -274,11 +274,11 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"N01496", "N05916", "N01046", "N00675", "N01320", "N01321", "N00273", "N01453",
|
||||
"N02984", "T09417", "T01882", "T08820", "N04689", "T08891", "T00986", "N00316",
|
||||
"N03544", "N04296", "N04297", "T08234", "N00112", "T00211", "N01497", "N02639",
|
||||
"N02640", "T00925", "T11683", "T08269", "D00001", "D00002", "D00046", "N00121",
|
||||
"N00126", "T08626",
|
||||
"T09417", "T01882", "T08820", "N04689", "T08891", "T00986", "N00316", "N03544",
|
||||
"N04296", "N04297", "T08234", "N00112", "T00211", "N01497", "N02639", "N02640",
|
||||
"T00925", "T11683", "T08269", "D00001", "D00002", "D00046", "N00121", "N00126",
|
||||
"T08626", "N01496", "N05916", "N01046", "N00675", "N01320", "N01321", "N00273",
|
||||
"N01453", "N02984",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -289,11 +289,11 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"T09417", "T01882", "T08820", "N04689", "T08891", "T00986", "N00316", "N03544",
|
||||
"N04296", "N04297", "T08234", "N00112", "T00211", "N01497", "N02639", "N02640",
|
||||
"T00925", "T11683", "T08269", "D00001", "D00002", "D00046", "N00121", "N00126",
|
||||
"T08626", "N01496", "N05916", "N01046", "N00675", "N01320", "N01321", "N00273",
|
||||
"N01453", "N02984",
|
||||
"N01496", "N05916", "N01046", "N00675", "N01320", "N01321", "N00273", "N01453",
|
||||
"N02984", "T09417", "T01882", "T08820", "N04689", "T08891", "T00986", "N00316",
|
||||
"N03544", "N04296", "N04297", "T08234", "N00112", "T00211", "N01497", "N02639",
|
||||
"N02640", "T00925", "T11683", "T08269", "D00001", "D00002", "D00046", "N00121",
|
||||
"N00126", "T08626",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -307,9 +307,9 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"N04326", "N01610", "N02920", "N01587", "T00167", "T00168", "N01554", "N01535",
|
||||
"N01536", "N01622", "N01754", "N01594", "N01559", "N02123", "N01940", "N03594",
|
||||
"N01494", "N04271",
|
||||
"N01559", "N02123", "N01940", "N03594", "N01494", "N04271", "N04326", "N01610",
|
||||
"N02920", "N01587", "T00167", "T00168", "N01554", "N01535", "N01536", "N01622",
|
||||
"N01754", "N01594",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -323,9 +323,9 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"N01559", "N02123", "N01940", "N03594", "N01494", "N04271", "N04326", "N01610",
|
||||
"N02920", "N01587", "T00167", "T00168", "N01554", "N01535", "N01536", "N01622",
|
||||
"N01754", "N01594",
|
||||
"N04326", "N01610", "N02920", "N01587", "T00167", "T00168", "N01554", "N01535",
|
||||
"N01536", "N01622", "N01754", "N01594", "N01559", "N02123", "N01940", "N03594",
|
||||
"N01494", "N04271",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -340,12 +340,12 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"T09455", "T09334", "T10965", "T08626", "T09417", "T08951", "T01851", "T01852",
|
||||
"T08761", "T08123", "T08756", "T10561", "T10562", "T10563", "T00986", "T03424",
|
||||
"T03427", "T08234", "T08133", "T06866", "T08897", "T00996", "T00997", "T01095",
|
||||
"T03393", "T09456", "T00188", "T02362", "T09065", "T09547", "T10330", "T09187",
|
||||
"T03433", "T08635", "T02366", "T03436", "T09150", "T01861", "T09759", "T11683",
|
||||
"T02368", "T02369", "T08269", "T01018", "T10066", "T01710", "T01711", "T05764",
|
||||
"T09417", "T08951", "T01851", "T01852", "T08761", "T08123", "T08756", "T10561",
|
||||
"T10562", "T10563", "T00986", "T03424", "T03427", "T08234", "T08133", "T06866",
|
||||
"T08897", "T00996", "T00997", "T01095", "T03393", "T09456", "T00188", "T02362",
|
||||
"T09065", "T09547", "T10330", "T09187", "T03433", "T08635", "T02366", "T03436",
|
||||
"T09150", "T01861", "T09759", "T11683", "T02368", "T02369", "T08269", "T01018",
|
||||
"T10066", "T01710", "T01711", "T05764", "T09455", "T09334", "T10965", "T08626",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -360,12 +360,12 @@ pub async fn query(client: &Client, can_stem: bool) {
|
||||
email::query::Comparator::sent_at(),
|
||||
],
|
||||
vec![
|
||||
"T09417", "T08951", "T01851", "T01852", "T08761", "T08123", "T08756", "T10561",
|
||||
"T10562", "T10563", "T00986", "T03424", "T03427", "T08234", "T08133", "T06866",
|
||||
"T08897", "T00996", "T00997", "T01095", "T03393", "T09456", "T00188", "T02362",
|
||||
"T09065", "T09547", "T10330", "T09187", "T03433", "T08635", "T02366", "T03436",
|
||||
"T09150", "T01861", "T09759", "T11683", "T02368", "T02369", "T08269", "T01018",
|
||||
"T10066", "T01710", "T01711", "T05764", "T09455", "T09334", "T10965", "T08626",
|
||||
"T09455", "T09334", "T10965", "T08626", "T09417", "T08951", "T01851", "T01852",
|
||||
"T08761", "T08123", "T08756", "T10561", "T10562", "T10563", "T00986", "T03424",
|
||||
"T03427", "T08234", "T08133", "T06866", "T08897", "T00996", "T00997", "T01095",
|
||||
"T03393", "T09456", "T00188", "T02362", "T09065", "T09547", "T10330", "T09187",
|
||||
"T03433", "T08635", "T02366", "T03436", "T09150", "T01861", "T09759", "T11683",
|
||||
"T02368", "T02369", "T08269", "T01018", "T10066", "T01710", "T01711", "T05764",
|
||||
],
|
||||
),
|
||||
] {
|
||||
@@ -595,12 +595,12 @@ pub async fn query_options(client: &Client) {
|
||||
limit: 10,
|
||||
},
|
||||
vec![
|
||||
"N05779", "N04652", "N01534", "A00845", "N03409", "N03410", "N02061", "N02426",
|
||||
"N00662", "N01205",
|
||||
"T03614", "N05779", "N04652", "N01534", "A00845", "N03409", "N03410", "N02061",
|
||||
"N02426", "N00662",
|
||||
],
|
||||
vec![
|
||||
"N00443", "N02237", "T03025", "N01722", "N01356", "N01800", "T05475", "T01587",
|
||||
"N05779", "N01205",
|
||||
"N00436", "N00443", "N02237", "T03025", "N01722", "N01356", "N01800", "T05475",
|
||||
"T01587", "N05779",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -616,8 +616,14 @@ pub async fn query_options(client: &Client) {
|
||||
anchor_offset: -10,
|
||||
limit: 10,
|
||||
},
|
||||
vec!["N01496"],
|
||||
vec!["N01496"],
|
||||
vec![
|
||||
"N01496", "N01320", "N01321", "N05916", "N00273", "N01453", "N02984", "T08820",
|
||||
"N00112", "T00211",
|
||||
],
|
||||
vec![
|
||||
"N01496", "N01320", "N05916", "N01453", "T08820", "N01046", "N00675", "T08891",
|
||||
"T01882", "N04296",
|
||||
],
|
||||
),
|
||||
(
|
||||
EmailQuery {
|
||||
|
||||
@@ -31,7 +31,7 @@ pub async fn test(test: &TestServer) {
|
||||
|
||||
// Let people know that we'll be down in Kokomo
|
||||
client
|
||||
.vacation_response_create(
|
||||
.vacation_response_enable(
|
||||
"Off the Florida Keys there's a place called Kokomo",
|
||||
"That's where you wanna go to get away from it all".into(),
|
||||
"That's where <b>you wanna go</b> to get away from it all".into(),
|
||||
@@ -154,7 +154,13 @@ pub async fn test(test: &TestServer) {
|
||||
.await;
|
||||
|
||||
// Remove test data
|
||||
client.vacation_response_destroy().await.unwrap();
|
||||
client.vacation_response_disable().await.unwrap();
|
||||
client.sieve_script_deactivate().await.unwrap();
|
||||
let mut request = client.build();
|
||||
request.query_sieve_script();
|
||||
for id in request.send_query_sieve_script().await.unwrap().take_ids() {
|
||||
client.sieve_script_destroy(&id).await.unwrap();
|
||||
}
|
||||
test.destroy_all_mailboxes(account).await;
|
||||
test.assert_is_empty().await;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ pub async fn jmap_tests() {
|
||||
|
||||
test.insert_account(admin);
|
||||
|
||||
/*mail::get::test(&test).await;
|
||||
mail::get::test(&test).await;
|
||||
mail::set::test(&test).await;
|
||||
mail::parse::test(&test).await;
|
||||
mail::query::test(&test).await;
|
||||
@@ -207,7 +207,7 @@ pub async fn jmap_tests() {
|
||||
calendar::acl::test(&test).await;
|
||||
|
||||
principal::get::test(&test).await;
|
||||
principal::availability::test(&test).await;*/
|
||||
principal::availability::test(&test).await;
|
||||
|
||||
compliance::test(&test).await;
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Principal/getAvailability",
|
||||
{
|
||||
"accountId": &jane_id,
|
||||
"id": &john_id,
|
||||
"utcStart": "2006-01-01T00:00:00Z",
|
||||
"utcEnd": "2006-01-08T00:00:00Z",
|
||||
@@ -112,6 +113,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Principal/getAvailability",
|
||||
{
|
||||
"accountId": &jane_id,
|
||||
"id": &john_id,
|
||||
"utcStart": "2006-01-01T00:00:00Z",
|
||||
"utcEnd": "2006-01-08T00:00:00Z",
|
||||
@@ -183,6 +185,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Principal/getAvailability",
|
||||
{
|
||||
"accountId": &jane_id,
|
||||
"id": &john_id,
|
||||
"utcStart": "2006-01-01T00:00:00Z",
|
||||
"utcEnd": "2006-01-08T00:00:00Z",
|
||||
@@ -211,6 +214,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Principal/getAvailability",
|
||||
{
|
||||
"accountId": &jane_id,
|
||||
"id": &john_id,
|
||||
"utcStart": "2006-01-01T00:00:00Z",
|
||||
"utcEnd": "2006-01-08T00:00:00Z",
|
||||
@@ -246,6 +250,7 @@ pub async fn test(test: &TestServer) {
|
||||
.jmap_method_calls(json!([[
|
||||
"Principal/getAvailability",
|
||||
{
|
||||
"accountId": &jane_id,
|
||||
"id": &john_id,
|
||||
"utcStart": "2006-01-01T00:00:00Z",
|
||||
"utcEnd": "2006-01-08T00:00:00Z",
|
||||
|
||||
@@ -390,7 +390,26 @@ impl Account {
|
||||
);
|
||||
|
||||
let body = json!({
|
||||
"using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail", "urn:ietf:params:jmap:submission", "urn:ietf:params:jmap:vacationresponse", "urn:ietf:params:jmap:quota" ],
|
||||
"using": [
|
||||
"urn:ietf:params:jmap:core",
|
||||
"urn:ietf:params:jmap:mail",
|
||||
"urn:ietf:params:jmap:submission",
|
||||
"urn:ietf:params:jmap:vacationresponse",
|
||||
"urn:ietf:params:jmap:contacts",
|
||||
"urn:ietf:params:jmap:contacts:parse",
|
||||
"urn:ietf:params:jmap:calendars",
|
||||
"urn:ietf:params:jmap:calendars:parse",
|
||||
"urn:ietf:params:jmap:websocket",
|
||||
"urn:ietf:params:jmap:sieve",
|
||||
"urn:ietf:params:jmap:blob",
|
||||
"urn:ietf:params:jmap:quota",
|
||||
"urn:ietf:params:jmap:principals",
|
||||
"urn:ietf:params:jmap:principals:owner",
|
||||
"urn:ietf:params:jmap:principals:availability",
|
||||
"urn:ietf:params:jmap:filenode",
|
||||
"urn:ietf:params:jmap:mail:share",
|
||||
"urn:stalwart:jmap"
|
||||
],
|
||||
"methodCalls": calls
|
||||
});
|
||||
|
||||
@@ -457,6 +476,7 @@ impl Account {
|
||||
self.jmap_method_calls(json!([[
|
||||
"AddressBook/get",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"ids" : (),
|
||||
"properties" : [
|
||||
"id"
|
||||
@@ -467,6 +487,7 @@ impl Account {
|
||||
[
|
||||
"AddressBook/set",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"#destroy" : {
|
||||
"resultOf": "R1",
|
||||
"name": "AddressBook/get",
|
||||
@@ -484,6 +505,7 @@ impl Account {
|
||||
self.jmap_method_calls(json!([[
|
||||
"Calendar/get",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"ids" : (),
|
||||
"properties" : [
|
||||
"id"
|
||||
@@ -494,6 +516,7 @@ impl Account {
|
||||
[
|
||||
"Calendar/set",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"#destroy" : {
|
||||
"resultOf": "R1",
|
||||
"name": "Calendar/get",
|
||||
@@ -511,6 +534,7 @@ impl Account {
|
||||
self.jmap_method_calls(json!([[
|
||||
"CalendarEventNotification/get",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"ids" : (),
|
||||
"properties" : [
|
||||
"id"
|
||||
@@ -521,6 +545,7 @@ impl Account {
|
||||
[
|
||||
"CalendarEventNotification/set",
|
||||
{
|
||||
"accountId": self.id_string(),
|
||||
"#destroy" : {
|
||||
"resultOf": "R1",
|
||||
"name": "CalendarEventNotification/get",
|
||||
|
||||
Reference in New Issue
Block a user