From 6aa816d96a6d45d7f09ffa5eb6741e9536d98f1b Mon Sep 17 00:00:00 2001 From: Irevoire Date: Wed, 26 Oct 2022 18:49:47 +0200 Subject: [PATCH] use meili-snap in the dump --- Cargo.lock | 1 - dump/Cargo.toml | 1 - dump/src/reader/compat/v2_to_v3.rs | 1 + dump/src/reader/compat/v3_to_v4.rs | 1 + dump/src/reader/compat/v4_to_v5.rs | 1 + dump/src/reader/compat/v5_to_v6.rs | 1 + dump/src/reader/mod.rs | 2 ++ dump/src/reader/v2/mod.rs | 1 + dump/src/reader/v3/mod.rs | 1 + dump/src/reader/v4/mod.rs | 1 + dump/src/reader/v5/mod.rs | 1 + dump/src/writer.rs | 1 + 12 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 55031e7fe..2f43356f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1107,7 +1107,6 @@ dependencies = [ "big_s", "flate2", "http", - "insta", "log", "maplit", "meili-snap", diff --git a/dump/Cargo.toml b/dump/Cargo.toml index dba94ba47..c7bf76879 100644 --- a/dump/Cargo.toml +++ b/dump/Cargo.toml @@ -23,7 +23,6 @@ uuid = { version = "1.1.2", features = ["serde", "v4"] } [dev-dependencies] big_s = "1.0.2" -insta = { version = "1.19.1", features = ["json", "redactions"] } maplit = "1.0.2" meili-snap = { path = "../meili-snap" } meilisearch-types = { path = "../meilisearch-types" } diff --git a/dump/src/reader/compat/v2_to_v3.rs b/dump/src/reader/compat/v2_to_v3.rs index ae1f7118c..301cdc5ef 100644 --- a/dump/src/reader/compat/v2_to_v3.rs +++ b/dump/src/reader/compat/v2_to_v3.rs @@ -375,6 +375,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/compat/v3_to_v4.rs b/dump/src/reader/compat/v3_to_v4.rs index 20af18c21..46ee0f5fc 100644 --- a/dump/src/reader/compat/v3_to_v4.rs +++ b/dump/src/reader/compat/v3_to_v4.rs @@ -341,6 +341,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/compat/v4_to_v5.rs b/dump/src/reader/compat/v4_to_v5.rs index a7d695cbe..1fc6cb155 100644 --- a/dump/src/reader/compat/v4_to_v5.rs +++ b/dump/src/reader/compat/v4_to_v5.rs @@ -377,6 +377,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/compat/v5_to_v6.rs b/dump/src/reader/compat/v5_to_v6.rs index 5d01f0c47..3188e2bb0 100644 --- a/dump/src/reader/compat/v5_to_v6.rs +++ b/dump/src/reader/compat/v5_to_v6.rs @@ -395,6 +395,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/mod.rs b/dump/src/reader/mod.rs index dbbcab88b..7d6c6623f 100644 --- a/dump/src/reader/mod.rs +++ b/dump/src/reader/mod.rs @@ -184,6 +184,8 @@ impl From for DumpIndexReader { pub(crate) mod test { use std::fs::File; + use meili_snap::insta; + use super::*; #[test] diff --git a/dump/src/reader/v2/mod.rs b/dump/src/reader/v2/mod.rs index 73396db50..ee632d3de 100644 --- a/dump/src/reader/v2/mod.rs +++ b/dump/src/reader/v2/mod.rs @@ -205,6 +205,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/v3/mod.rs b/dump/src/reader/v3/mod.rs index 387064f97..7e4f8ffea 100644 --- a/dump/src/reader/v3/mod.rs +++ b/dump/src/reader/v3/mod.rs @@ -221,6 +221,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/v4/mod.rs b/dump/src/reader/v4/mod.rs index d71cd5d6a..5142df99c 100644 --- a/dump/src/reader/v4/mod.rs +++ b/dump/src/reader/v4/mod.rs @@ -213,6 +213,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/reader/v5/mod.rs b/dump/src/reader/v5/mod.rs index 5df544bd0..44e54dd20 100644 --- a/dump/src/reader/v5/mod.rs +++ b/dump/src/reader/v5/mod.rs @@ -255,6 +255,7 @@ pub(crate) mod test { use std::io::BufReader; use flate2::bufread::GzDecoder; + use meili_snap::insta; use tempfile::TempDir; use super::*; diff --git a/dump/src/writer.rs b/dump/src/writer.rs index b34a6aee9..7de168da2 100644 --- a/dump/src/writer.rs +++ b/dump/src/writer.rs @@ -191,6 +191,7 @@ pub(crate) mod test { use std::str::FromStr; use flate2::bufread::GzDecoder; + use meili_snap::insta; use meilisearch_types::settings::Unchecked; use super::*;