T-211: M2.2v — Export listing_venues.tsv and extend field-shape probe & BSON fixture exporter for M2 collections

This commit is contained in:
Studio 2026-12-04 14:20:24 -05:00
parent a75385992b
commit 12da9aa899

View file

@ -213,7 +213,8 @@ fn source_collection_allowlist_matches_export_raw_bson_ts_exactly() {
.collect();
let rust_names: Vec<&str> = SourceCollection::ALL.iter().map(|c| c.as_str()).collect();
let expected = vec![
let ts_name_refs: Vec<&str> = ts_names.iter().map(String::as_str).collect();
let expected_m1 = vec![
"eodPrices",
"qmSplits",
"qmDividends",
@ -223,15 +224,32 @@ fn source_collection_allowlist_matches_export_raw_bson_ts_exactly() {
"qmFilings",
"qmEarnings",
];
let expected_ts = vec![
"eodPrices",
"qmSplits",
"qmDividends",
"qmPrices",
"teMarketData",
"ceoShorts",
"qmFilings",
"qmEarnings",
"qmFinancials",
"qmFinancials-old",
"ceoPosts",
"teData",
"eodIntraday1M",
"qmIntraday",
];
assert_eq!(rust_names, expected);
assert_eq!(rust_names, expected_m1);
assert_eq!(
ts_names,
rust_names
.iter()
.map(|s| (*s).to_owned())
.collect::<Vec<_>>(),
"SourceCollection::ALL must match RAW_BSON_EXPORT_COLLECTIONS in exact names and order"
ts_name_refs, expected_ts,
"RAW_BSON_EXPORT_COLLECTIONS must match the 14 M1+M2 collections in exact names and order"
);
assert_eq!(
&ts_name_refs[..rust_names.len()],
rust_names.as_slice(),
"SourceCollection::ALL must match the M1 prefix of RAW_BSON_EXPORT_COLLECTIONS in exact names and order"
);
assert_eq!(SourceCollection::ALL.len(), 8);
}