v0.3.13-pre.005
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 20
|
||||
// version: 21
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -296,6 +296,44 @@ fn v0_3_13_pre_004_standard_block_source_is_direct_raw_and_transport_facade_only
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_005_helius_transaction_source_reuses_transport_facade_and_common_hydration_only() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in [
|
||||
"RawTransactionIngestHeliusTransactionSource",
|
||||
"HeliusLaserStreamWsSession::connect",
|
||||
".transaction_subscribe(",
|
||||
"HeliusTransactionSubscribeOptions::new",
|
||||
"HeliusTransactionSubscribeEncoding::Base64",
|
||||
"SolanaTransactionDetails::Full",
|
||||
"std::option::Option::Some(1)",
|
||||
"project_helius_transaction_signal",
|
||||
"helius_ws_http",
|
||||
"get_transaction_observed",
|
||||
"max_pending_signals: settings.admission_queue_capacity()",
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.005 Helius transaction contract missing: {required}");
|
||||
}
|
||||
assert_eq!(resources.matches("get_transaction_observed(").count(), 1);
|
||||
for forbidden in [
|
||||
"ksp_config_lib::",
|
||||
"ksp_job_backfill_lib::",
|
||||
"ksp_store_postgres_lib::",
|
||||
"reqwest::",
|
||||
"tokio_tungstenite::",
|
||||
"helius_sdk",
|
||||
"unbounded_channel",
|
||||
] {
|
||||
assert!(
|
||||
!runtime.contains(forbidden) && !resources.contains(forbidden) && !root.contains(forbidden),
|
||||
"pre.005 crossed a forbidden Helius transaction boundary: {forbidden}",
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn runtime_contains(value: &str) -> bool {
|
||||
return include_str!("../src/runtime.rs").contains(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user