diff --git a/src/db/to_bin/clinvar/mod.rs b/src/db/to_bin/clinvar/mod.rs index a93cd070..14099bd7 100644 --- a/src/db/to_bin/clinvar/mod.rs +++ b/src/db/to_bin/clinvar/mod.rs @@ -185,10 +185,19 @@ mod test { use crate::common::open_read_maybe_gz; use crate::db::to_bin::clinvar::input::Assembly; + macro_rules! set_snapshot_suffix { + ($($expr:expr),*) => { + let mut settings = insta::Settings::clone_current(); + settings.set_snapshot_suffix(format!($($expr,)*)); + let _guard = settings.bind_to_scope(); + } + } + #[rstest::rstest] #[case(Assembly::Grch37)] #[case(Assembly::Grch38)] fn run_convert_jsonl_to_protobuf(#[case] assembly: Assembly) -> Result<(), anyhow::Error> { + set_snapshot_suffix!("{:?}", assembly); let reader = open_read_maybe_gz( "tests/db/to-bin/varfish-db-downloader/vardbs/clinvar/clinvar-svs.jsonl", )?; diff --git a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf-2.snap b/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap.new similarity index 99% rename from src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf-2.snap rename to src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap.new index 0293635e..18bb0ea8 100644 --- a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf-2.snap +++ b/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap.new @@ -1,5 +1,6 @@ --- source: src/db/to_bin/clinvar/mod.rs +assertion_line: 206 expression: records --- - chrom_no: 6 diff --git a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf.snap b/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap.new similarity index 99% rename from src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf.snap rename to src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap.new index 607b9160..e584c656 100644 --- a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf.snap +++ b/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap.new @@ -1,5 +1,6 @@ --- source: src/db/to_bin/clinvar/mod.rs +assertion_line: 206 expression: records --- - chrom_no: 6