From bc23b235a8702fdddf36c1571956cd2f01416c13 Mon Sep 17 00:00:00 2001 From: Alex Coats Date: Wed, 1 Nov 2023 13:37:41 -0400 Subject: [PATCH] use pretty assertions --- Cargo.lock | 23 +++++++++++++++++++ Cargo.toml | 1 + src/analytics/ledger/mod.rs | 2 ++ src/analytics/mod.rs | 1 + src/analytics/tangle/mod.rs | 2 ++ .../inx-chronicle/api/explorer/extractors.rs | 1 + src/bin/inx-chronicle/api/extractors.rs | 1 + .../inx-chronicle/api/indexer/extractors.rs | 1 + .../inx-chronicle/api/poi/merkle_hasher.rs | 1 + src/bin/inx-chronicle/api/poi/merkle_proof.rs | 2 ++ .../collections/outputs/indexer/alias.rs | 1 + .../collections/outputs/indexer/basic.rs | 1 + .../collections/outputs/indexer/foundry.rs | 1 + .../collections/outputs/indexer/nft.rs | 1 + src/inx/raw.rs | 1 + src/inx/request.rs | 2 ++ src/model/block/mod.rs | 1 + .../payload/milestone/milestone_index.rs | 2 ++ .../payload/milestone/milestone_timestamp.rs | 1 + src/model/block/payload/milestone/mod.rs | 1 + src/model/block/payload/mod.rs | 1 + src/model/block/payload/tagged_data.rs | 1 + src/model/block/payload/transaction/input.rs | 1 + src/model/block/payload/transaction/mod.rs | 1 + .../payload/transaction/output/address/mod.rs | 1 + .../block/payload/transaction/output/alias.rs | 1 + .../block/payload/transaction/output/basic.rs | 1 + .../payload/transaction/output/feature.rs | 1 + .../payload/transaction/output/foundry.rs | 1 + .../payload/transaction/output/ledger.rs | 1 + .../block/payload/transaction/output/mod.rs | 1 + .../transaction/output/native_token.rs | 1 + .../block/payload/transaction/output/nft.rs | 1 + .../payload/transaction/output/treasury.rs | 1 + src/model/block/payload/transaction/unlock.rs | 1 + .../block/payload/treasury_transaction.rs | 1 + src/model/signature.rs | 1 + tests/blocks.rs | 1 + tests/ledger_updates.rs | 1 + tests/milestones.rs | 1 + tests/node_configuration.rs | 1 + tests/outputs.rs | 1 + tests/protocol_updates.rs | 1 + tests/treasury_updates.rs | 1 + 44 files changed, 71 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 2be6e6050..d226e51a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -509,6 +509,7 @@ dependencies = [ "packable", "pin-project", "prefix-hex", + "pretty_assertions", "primitive-types", "rand", "regex", @@ -831,6 +832,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.9.0" @@ -2290,6 +2297,16 @@ dependencies = [ "uint", ] +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "prettyplease" version = "0.1.25" @@ -4059,6 +4076,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "yazi" version = "0.1.6" diff --git a/Cargo.toml b/Cargo.toml index 55fa7d497..95d2f7797 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,6 +78,7 @@ tonic = { version = "0.8", default-features = false, optional = true } [dev-dependencies] bincode = { version = "1.3", default-features = false } iota-sdk = { version = "1.1", default-features = false, features = [ "std", "serde", "rand" ] } +pretty_assertions = { version = "1.4", default-features = false, features = [ "std" ] } rand = { version = "0.8", default-features = false, features = [ "std" ] } ron = { version = "0.8", default-features = false } yazi = { version = "0.1", default-features = false } diff --git a/src/analytics/ledger/mod.rs b/src/analytics/ledger/mod.rs index b8529fd81..92969eddc 100644 --- a/src/analytics/ledger/mod.rs +++ b/src/analytics/ledger/mod.rs @@ -65,6 +65,8 @@ impl CountAndAmount { mod test { use std::collections::BTreeMap; + use pretty_assertions::assert_eq; + use super::*; use crate::{ analytics::{test::TestContext, Analytics}, diff --git a/src/analytics/mod.rs b/src/analytics/mod.rs index d28e2613c..2f2a64308 100644 --- a/src/analytics/mod.rs +++ b/src/analytics/mod.rs @@ -375,6 +375,7 @@ mod test { use futures::TryStreamExt; use packable::PackableExt; + use pretty_assertions::assert_eq; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use super::{ diff --git a/src/analytics/tangle/mod.rs b/src/analytics/tangle/mod.rs index 59a8d52d6..87411b95d 100644 --- a/src/analytics/tangle/mod.rs +++ b/src/analytics/tangle/mod.rs @@ -19,6 +19,8 @@ mod protocol_params; #[cfg(test)] mod test { + use pretty_assertions::assert_eq; + use super::BlockActivityMeasurement; use crate::{ analytics::{tangle::MilestoneSizeMeasurement, test::TestContext, Analytics}, diff --git a/src/bin/inx-chronicle/api/explorer/extractors.rs b/src/bin/inx-chronicle/api/explorer/extractors.rs index 4b69a905b..f992c136f 100644 --- a/src/bin/inx-chronicle/api/explorer/extractors.rs +++ b/src/bin/inx-chronicle/api/explorer/extractors.rs @@ -450,6 +450,7 @@ impl FromRequest for BlocksByMilestoneIdPagination { #[cfg(test)] mod test { use axum::{extract::RequestParts, http::Request}; + use pretty_assertions::assert_eq; use super::*; use crate::api::ApiConfig; diff --git a/src/bin/inx-chronicle/api/extractors.rs b/src/bin/inx-chronicle/api/extractors.rs index b8ef5161c..3cdcbea46 100644 --- a/src/bin/inx-chronicle/api/extractors.rs +++ b/src/bin/inx-chronicle/api/extractors.rs @@ -104,6 +104,7 @@ mod test { extract::{FromRequest, RequestParts}, http::Request, }; + use pretty_assertions::assert_eq; use super::*; use crate::api::ApiConfig; diff --git a/src/bin/inx-chronicle/api/indexer/extractors.rs b/src/bin/inx-chronicle/api/indexer/extractors.rs index 94fa4e501..635ead9fa 100644 --- a/src/bin/inx-chronicle/api/indexer/extractors.rs +++ b/src/bin/inx-chronicle/api/indexer/extractors.rs @@ -439,6 +439,7 @@ impl FromRequest for IndexedOutputsPagination { #[cfg(test)] mod test { use axum::{extract::RequestParts, http::Request}; + use pretty_assertions::assert_eq; use super::*; use crate::api::ApiConfig; diff --git a/src/bin/inx-chronicle/api/poi/merkle_hasher.rs b/src/bin/inx-chronicle/api/poi/merkle_hasher.rs index ad1375ac5..25c2d5a34 100644 --- a/src/bin/inx-chronicle/api/poi/merkle_hasher.rs +++ b/src/bin/inx-chronicle/api/poi/merkle_hasher.rs @@ -60,6 +60,7 @@ mod tests { use std::str::FromStr; use chronicle::model::BlockId; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/bin/inx-chronicle/api/poi/merkle_proof.rs b/src/bin/inx-chronicle/api/poi/merkle_proof.rs index 330e34fc5..903f93542 100644 --- a/src/bin/inx-chronicle/api/poi/merkle_proof.rs +++ b/src/bin/inx-chronicle/api/poi/merkle_proof.rs @@ -202,6 +202,8 @@ impl TryFrom for Hashable { mod tests { use std::str::FromStr; + use pretty_assertions::assert_eq; + use super::*; #[test] diff --git a/src/db/mongodb/collections/outputs/indexer/alias.rs b/src/db/mongodb/collections/outputs/indexer/alias.rs index c66a6814a..ed591247e 100644 --- a/src/db/mongodb/collections/outputs/indexer/alias.rs +++ b/src/db/mongodb/collections/outputs/indexer/alias.rs @@ -48,6 +48,7 @@ impl From for bson::Document { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{self, doc}; + use pretty_assertions::assert_eq; use primitive_types::U256; use super::AliasOutputsQuery; diff --git a/src/db/mongodb/collections/outputs/indexer/basic.rs b/src/db/mongodb/collections/outputs/indexer/basic.rs index 7c410e365..cff01b620 100644 --- a/src/db/mongodb/collections/outputs/indexer/basic.rs +++ b/src/db/mongodb/collections/outputs/indexer/basic.rs @@ -70,6 +70,7 @@ impl From for bson::Document { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{self, doc}; + use pretty_assertions::assert_eq; use primitive_types::U256; use super::BasicOutputsQuery; diff --git a/src/db/mongodb/collections/outputs/indexer/foundry.rs b/src/db/mongodb/collections/outputs/indexer/foundry.rs index ed909f54e..3307e441e 100644 --- a/src/db/mongodb/collections/outputs/indexer/foundry.rs +++ b/src/db/mongodb/collections/outputs/indexer/foundry.rs @@ -39,6 +39,7 @@ impl From for bson::Document { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{self, doc}; + use pretty_assertions::assert_eq; use primitive_types::U256; use super::FoundryOutputsQuery; diff --git a/src/db/mongodb/collections/outputs/indexer/nft.rs b/src/db/mongodb/collections/outputs/indexer/nft.rs index 80bbb32fd..24812c63f 100644 --- a/src/db/mongodb/collections/outputs/indexer/nft.rs +++ b/src/db/mongodb/collections/outputs/indexer/nft.rs @@ -72,6 +72,7 @@ impl From for bson::Document { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{self, doc}; + use pretty_assertions::assert_eq; use primitive_types::U256; use super::NftOutputsQuery; diff --git a/src/inx/raw.rs b/src/inx/raw.rs index ebb5d384b..02e27bb73 100644 --- a/src/inx/raw.rs +++ b/src/inx/raw.rs @@ -86,6 +86,7 @@ impl From> for proto::RawMi #[cfg(test)] mod test { use iota_sdk::types::block::{payload::Payload, rand::output::rand_output}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/inx/request.rs b/src/inx/request.rs index ccbfe4dee..e7ab9c299 100644 --- a/src/inx/request.rs +++ b/src/inx/request.rs @@ -93,6 +93,8 @@ impl From for proto::MilestoneRangeRequest { #[cfg(test)] mod test { + use pretty_assertions::assert_eq; + use super::*; #[test] diff --git a/src/model/block/mod.rs b/src/model/block/mod.rs index b3c094837..f801fe1fd 100644 --- a/src/model/block/mod.rs +++ b/src/model/block/mod.rs @@ -233,6 +233,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{doc, from_bson, to_bson, to_document, Bson}; + use pretty_assertions::assert_eq; use super::*; use crate::model::payload::TransactionEssence; diff --git a/src/model/block/payload/milestone/milestone_index.rs b/src/model/block/payload/milestone/milestone_index.rs index 2c90965f4..e25744fdd 100644 --- a/src/model/block/payload/milestone/milestone_index.rs +++ b/src/model/block/payload/milestone/milestone_index.rs @@ -114,6 +114,8 @@ impl FromStr for MilestoneIndex { #[cfg(test)] mod test { + use pretty_assertions::assert_eq; + use super::*; #[test] diff --git a/src/model/block/payload/milestone/milestone_timestamp.rs b/src/model/block/payload/milestone/milestone_timestamp.rs index 01dda8cbb..15aef26a9 100644 --- a/src/model/block/payload/milestone/milestone_timestamp.rs +++ b/src/model/block/payload/milestone/milestone_timestamp.rs @@ -48,6 +48,7 @@ impl From for influxdb::Timestamp { #[cfg(test)] mod test { + use pretty_assertions::assert_eq; use time::macros::datetime; use super::*; diff --git a/src/model/block/payload/milestone/mod.rs b/src/model/block/payload/milestone/mod.rs index 27844e39f..e5bab0ef7 100644 --- a/src/model/block/payload/milestone/mod.rs +++ b/src/model/block/payload/milestone/mod.rs @@ -403,6 +403,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson, Bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/mod.rs b/src/model/block/payload/mod.rs index 9134c015f..bf185a0ea 100644 --- a/src/model/block/payload/mod.rs +++ b/src/model/block/payload/mod.rs @@ -132,6 +132,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{doc, from_bson, to_bson, to_document}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/tagged_data.rs b/src/model/block/payload/tagged_data.rs index 7ae04c681..d2b9e72c9 100644 --- a/src/model/block/payload/tagged_data.rs +++ b/src/model/block/payload/tagged_data.rs @@ -66,6 +66,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/input.rs b/src/model/block/payload/transaction/input.rs index e8ce4a3c8..f2cc79c4f 100644 --- a/src/model/block/payload/transaction/input.rs +++ b/src/model/block/payload/transaction/input.rs @@ -95,6 +95,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/mod.rs b/src/model/block/payload/transaction/mod.rs index fe43a402c..eee9ba756 100644 --- a/src/model/block/payload/transaction/mod.rs +++ b/src/model/block/payload/transaction/mod.rs @@ -289,6 +289,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{doc, from_bson, to_bson, to_document}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/address/mod.rs b/src/model/block/payload/transaction/output/address/mod.rs index 7df073896..e85e9697a 100644 --- a/src/model/block/payload/transaction/output/address/mod.rs +++ b/src/model/block/payload/transaction/output/address/mod.rs @@ -107,6 +107,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/alias.rs b/src/model/block/payload/transaction/output/alias.rs index de4e2f20a..d46c0756f 100644 --- a/src/model/block/payload/transaction/output/alias.rs +++ b/src/model/block/payload/transaction/output/alias.rs @@ -238,6 +238,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/basic.rs b/src/model/block/payload/transaction/output/basic.rs index 55c21816c..1e132aede 100644 --- a/src/model/block/payload/transaction/output/basic.rs +++ b/src/model/block/payload/transaction/output/basic.rs @@ -160,6 +160,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/feature.rs b/src/model/block/payload/transaction/output/feature.rs index cdf5929c1..39a0af41a 100644 --- a/src/model/block/payload/transaction/output/feature.rs +++ b/src/model/block/payload/transaction/output/feature.rs @@ -138,6 +138,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/foundry.rs b/src/model/block/payload/transaction/output/foundry.rs index 0621432bb..829320467 100644 --- a/src/model/block/payload/transaction/output/foundry.rs +++ b/src/model/block/payload/transaction/output/foundry.rs @@ -199,6 +199,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/ledger.rs b/src/model/block/payload/transaction/output/ledger.rs index 3a1db0486..6c1e6a69b 100644 --- a/src/model/block/payload/transaction/output/ledger.rs +++ b/src/model/block/payload/transaction/output/ledger.rs @@ -149,6 +149,7 @@ mod test { #[test] fn test_compute_rent_structure() { use iota_sdk::types::block::{output::Rent, rand::output}; + use pretty_assertions::assert_eq; use super::RentStructureBytes; diff --git a/src/model/block/payload/transaction/output/mod.rs b/src/model/block/payload/transaction/output/mod.rs index d5dbaa0f0..4e1797371 100644 --- a/src/model/block/payload/transaction/output/mod.rs +++ b/src/model/block/payload/transaction/output/mod.rs @@ -368,6 +368,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/native_token.rs b/src/model/block/payload/transaction/output/native_token.rs index e8a644818..54ec07c2c 100644 --- a/src/model/block/payload/transaction/output/native_token.rs +++ b/src/model/block/payload/transaction/output/native_token.rs @@ -196,6 +196,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/nft.rs b/src/model/block/payload/transaction/output/nft.rs index d746ff789..afd4a76c6 100644 --- a/src/model/block/payload/transaction/output/nft.rs +++ b/src/model/block/payload/transaction/output/nft.rs @@ -244,6 +244,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/output/treasury.rs b/src/model/block/payload/transaction/output/treasury.rs index ea91ddcc3..c0e62dde3 100644 --- a/src/model/block/payload/transaction/output/treasury.rs +++ b/src/model/block/payload/transaction/output/treasury.rs @@ -68,6 +68,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/transaction/unlock.rs b/src/model/block/payload/transaction/unlock.rs index fc62f96af..abe02aeb8 100644 --- a/src/model/block/payload/transaction/unlock.rs +++ b/src/model/block/payload/transaction/unlock.rs @@ -136,6 +136,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/block/payload/treasury_transaction.rs b/src/model/block/payload/treasury_transaction.rs index 8a39633cb..4e0d4733f 100644 --- a/src/model/block/payload/treasury_transaction.rs +++ b/src/model/block/payload/treasury_transaction.rs @@ -86,6 +86,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/src/model/signature.rs b/src/model/signature.rs index 1a1d4696d..20dbe711d 100644 --- a/src/model/signature.rs +++ b/src/model/signature.rs @@ -83,6 +83,7 @@ mod rand { #[cfg(all(test, feature = "rand"))] mod test { use mongodb::bson::{from_bson, to_bson}; + use pretty_assertions::assert_eq; use super::*; diff --git a/tests/blocks.rs b/tests/blocks.rs index df87160f5..c309ee9a7 100644 --- a/tests/blocks.rs +++ b/tests/blocks.rs @@ -18,6 +18,7 @@ mod test_rand { }; use futures::TryStreamExt; use packable::PackableExt; + use pretty_assertions::assert_eq; use serde::Deserialize; #[derive(Deserialize)] diff --git a/tests/ledger_updates.rs b/tests/ledger_updates.rs index acf62aa9b..c5c175455 100644 --- a/tests/ledger_updates.rs +++ b/tests/ledger_updates.rs @@ -24,6 +24,7 @@ mod test_rand { }; use futures::TryStreamExt; use iota_sdk::types::block::rand::number::rand_number_range; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown}; diff --git a/tests/milestones.rs b/tests/milestones.rs index 4829d765a..74526eb32 100644 --- a/tests/milestones.rs +++ b/tests/milestones.rs @@ -9,6 +9,7 @@ mod test_rand { db::mongodb::collections::MilestoneCollection, model::payload::{MilestoneId, MilestonePayload}, }; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown}; diff --git a/tests/node_configuration.rs b/tests/node_configuration.rs index c08bf1db6..e43e24eab 100644 --- a/tests/node_configuration.rs +++ b/tests/node_configuration.rs @@ -9,6 +9,7 @@ mod test_rand { db::{mongodb::collections::ConfigurationUpdateCollection, MongoDbCollectionExt}, model::{BaseToken, MilestoneKeyRange, NodeConfiguration}, }; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown}; diff --git a/tests/outputs.rs b/tests/outputs.rs index 866d29b15..35fc448dd 100644 --- a/tests/outputs.rs +++ b/tests/outputs.rs @@ -16,6 +16,7 @@ mod test_rand { BlockId, }, }; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown}; diff --git a/tests/protocol_updates.rs b/tests/protocol_updates.rs index 9b480cd5a..1e1b8cce8 100644 --- a/tests/protocol_updates.rs +++ b/tests/protocol_updates.rs @@ -10,6 +10,7 @@ mod test_rand { model::{tangle::MilestoneIndex, ProtocolParameters}, }; use iota_sdk::types::block::rand::number::rand_number_range; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown}; diff --git a/tests/treasury_updates.rs b/tests/treasury_updates.rs index 16e5882a4..2b463e738 100644 --- a/tests/treasury_updates.rs +++ b/tests/treasury_updates.rs @@ -15,6 +15,7 @@ mod test_rand { }, }; use iota_sdk::types::block::rand::number::rand_number_range; + use pretty_assertions::assert_eq; use super::common::{setup_collection, setup_database, teardown};