From 6730e190dbdac6b65fe03da507d34abd3547755e Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 19 Oct 2022 12:13:42 +0200 Subject: [PATCH] fix the dumps tests since we added informations in the DumpTask --- dump/src/reader/compat/v5_to_v6.rs | 2 +- dump/src/reader/mod.rs | 20 ++++++++++---------- dump/src/reader/v5/mod.rs | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dump/src/reader/compat/v5_to_v6.rs b/dump/src/reader/compat/v5_to_v6.rs index 96d78a17a..2c3fd0eb6 100644 --- a/dump/src/reader/compat/v5_to_v6.rs +++ b/dump/src/reader/compat/v5_to_v6.rs @@ -421,7 +421,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"8c6cd41457c0b7e4c6727c9c85b7abac"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"b37c01556be2e5ded407a9319915b406"); assert_eq!(update_files.len(), 22); assert!(update_files[0].is_none()); // the dump creation assert!(update_files[1].is_some()); // the enqueued document addition diff --git a/dump/src/reader/mod.rs b/dump/src/reader/mod.rs index 3c31bb2d7..33e86fa9a 100644 --- a/dump/src/reader/mod.rs +++ b/dump/src/reader/mod.rs @@ -201,16 +201,16 @@ pub(crate) mod test { insta::assert_display_snapshot!(dump.instance_uid().unwrap().unwrap(), @"9e15e977-f2ae-4761-943f-1eaf75fd736d"); // tasks - let tasks = dump.tasks().collect::>>().unwrap(); + let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"8c6cd41457c0b7e4c6727c9c85b7abac"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"b37c01556be2e5ded407a9319915b406"); assert_eq!(update_files.len(), 22); assert!(update_files[0].is_none()); // the dump creation assert!(update_files[1].is_some()); // the enqueued document addition assert!(update_files[2..].iter().all(|u| u.is_none())); // everything already processed // keys - let keys = dump.keys().collect::>>().unwrap(); + let keys = dump.keys().unwrap().collect::>>().unwrap(); meili_snap::snapshot_hash!(meili_snap::json_string!(keys), @"c9d2b467fe2fca0b35580d8a999808fb"); // indexes @@ -291,7 +291,7 @@ pub(crate) mod test { insta::assert_display_snapshot!(dump.instance_uid().unwrap().unwrap(), @"9e15e977-f2ae-4761-943f-1eaf75fd736d"); // tasks - let tasks = dump.tasks().collect::>>().unwrap(); + let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"acd74244b4e6578c353899e6db30b0b5"); assert_eq!(update_files.len(), 10); @@ -299,8 +299,8 @@ pub(crate) mod test { assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed // keys - let keys = dump.keys().collect::>>().unwrap(); - meili_snap::snapshot_hash!(meili_snap::json_string!(keys, { "[].uid" => "[uuid]" }), @"23afab5753c5a99d8c530075bf0ebd9c"); + let keys = dump.keys().unwrap().collect::>>().unwrap(); + meili_snap::snapshot_hash!(meili_snap::json_string!(keys, { "[].uid" => "[uuid]" }), @"d751713988987e9331980363e24189ce"); // indexes let mut indexes = dump.indexes().unwrap().collect::>>().unwrap(); @@ -380,7 +380,7 @@ pub(crate) mod test { assert_eq!(dump.instance_uid().unwrap(), None); // tasks - let tasks = dump.tasks().collect::>>().unwrap(); + let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"fa74f7c6ab3014e09bb813fdc551db8f"); assert_eq!(update_files.len(), 10); @@ -388,7 +388,7 @@ pub(crate) mod test { assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed // keys - let keys = dump.keys().collect::>>().unwrap(); + let keys = dump.keys().unwrap().collect::>>().unwrap(); meili_snap::snapshot_hash!(meili_snap::json_string!(keys), @"d751713988987e9331980363e24189ce"); // indexes @@ -489,7 +489,7 @@ pub(crate) mod test { assert_eq!(dump.instance_uid().unwrap(), None); // tasks - let tasks = dump.tasks().collect::>>().unwrap(); + let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"19882e94dc085f1d60eb7df5005a3224"); assert_eq!(update_files.len(), 9); @@ -497,7 +497,7 @@ pub(crate) mod test { assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed // keys - let keys = dump.keys().collect::>>().unwrap(); + let keys = dump.keys().unwrap().collect::>>().unwrap(); meili_snap::snapshot_hash!(meili_snap::json_string!(keys), @"d751713988987e9331980363e24189ce"); // indexes diff --git a/dump/src/reader/v5/mod.rs b/dump/src/reader/v5/mod.rs index 9381f2ce4..39cbe22a6 100644 --- a/dump/src/reader/v5/mod.rs +++ b/dump/src/reader/v5/mod.rs @@ -295,7 +295,7 @@ pub(crate) mod test { meili_snap::snapshot_hash!(meili_snap::json_string!(update_file), @"7b8889539b669c7b9ddba448bafa385d"); // keys - let keys = dump.keys().collect::>>().unwrap(); + let keys = dump.keys().unwrap().collect::>>().unwrap(); meili_snap::snapshot_hash!(meili_snap::json_string!(keys), @"091ddad754f3cc7cf1d03a477855e819"); // indexes