mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-25 11:35:05 +08:00
uncomment a task serialization test
This commit is contained in:
parent
2f1eb78b1d
commit
b6c84e53ba
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -2363,12 +2363,14 @@ dependencies = [
|
|||||||
"actix-web",
|
"actix-web",
|
||||||
"csv",
|
"csv",
|
||||||
"either",
|
"either",
|
||||||
|
"insta",
|
||||||
|
"meili-snap",
|
||||||
"milli 0.33.4",
|
"milli 0.33.4",
|
||||||
"proptest",
|
"proptest",
|
||||||
"proptest-derive",
|
"proptest-derive",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"time 0.3.14",
|
"time",
|
||||||
"tokio",
|
"tokio",
|
||||||
"uuid 1.1.2",
|
"uuid 1.1.2",
|
||||||
]
|
]
|
||||||
|
@ -20,6 +20,8 @@ uuid = { version = "1.1.2", features = ["serde", "v4"] }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
proptest = "1.0.0"
|
proptest = "1.0.0"
|
||||||
proptest-derive = "0.3.0"
|
proptest-derive = "0.3.0"
|
||||||
|
meili-snap = { path = "../meili-snap" }
|
||||||
|
insta = "1.19.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["milli/default"]
|
default = ["milli/default"]
|
||||||
|
@ -365,10 +365,8 @@ pub fn serialize_duration<S: Serializer>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::assert_smol_debug_snapshot;
|
|
||||||
use crate::heed::{types::SerdeJson, BytesDecode, BytesEncode};
|
use crate::heed::{types::SerdeJson, BytesDecode, BytesEncode};
|
||||||
|
|
||||||
use super::Details;
|
use super::Details;
|
||||||
@ -382,8 +380,7 @@ mod tests {
|
|||||||
};
|
};
|
||||||
let serialised = SerdeJson::<Details>::bytes_encode(&details).unwrap();
|
let serialised = SerdeJson::<Details>::bytes_encode(&details).unwrap();
|
||||||
let deserialised = SerdeJson::<Details>::bytes_decode(&serialised).unwrap();
|
let deserialised = SerdeJson::<Details>::bytes_decode(&serialised).unwrap();
|
||||||
assert_smol_debug_snapshot!(details, @r###"DeleteTasks { matched_tasks: 1, deleted_tasks: None, original_query: "hello" }"###);
|
meili_snap::snapshot!(format!("{:?}", details), @r###"DeleteTasks { matched_tasks: 1, deleted_tasks: None, original_query: "hello" }"###);
|
||||||
assert_smol_debug_snapshot!(deserialised, @r###"DeleteTasks { matched_tasks: 1, deleted_tasks: None, original_query: "hello" }"###);
|
meili_snap::snapshot!(format!("{:?}", deserialised), @r###"DeleteTasks { matched_tasks: 1, deleted_tasks: None, original_query: "hello" }"###);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user