v0.3.11-pre.009
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 7
|
||||
// version: 8
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -52,7 +52,7 @@ fn pre_002_manifest_keeps_forbidden_layers_and_live_sources_out() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_008_source_surface_adds_one_latest_value_snapshot_watch_without_backend_or_live_source() {
|
||||
fn pre_009_source_surface_hardens_shutdown_and_faults_without_backend_or_live_source() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
let admission = include_str!("../src/admission.rs");
|
||||
@@ -69,6 +69,12 @@ fn pre_008_source_surface_adds_one_latest_value_snapshot_watch_without_backend_o
|
||||
"WorkerSnapshotSource",
|
||||
"tokio::sync::watch::channel",
|
||||
"ERROR_CODE_RAW_TRANSACTION_INGEST_COUNTER_EXHAUSTED",
|
||||
"ERROR_CODE_RAW_TRANSACTION_INGEST_DRAIN_TIMEOUT",
|
||||
"ERROR_CODE_RAW_TRANSACTION_INGEST_SOURCE_FAILED",
|
||||
"record_source_failure",
|
||||
"tokio::time::timeout",
|
||||
"abort_all",
|
||||
"backpressure_wait_total",
|
||||
] {
|
||||
assert!(
|
||||
root.contains(required)
|
||||
@@ -76,7 +82,7 @@ fn pre_008_source_surface_adds_one_latest_value_snapshot_watch_without_backend_o
|
||||
|| admission.contains(required)
|
||||
|| persistence.contains(required)
|
||||
|| snapshot.contains(required),
|
||||
"required pre.008 snapshot contract missing: {required}"
|
||||
"required pre.009 hardening contract missing: {required}"
|
||||
);
|
||||
}
|
||||
for forbidden in [
|
||||
@@ -87,8 +93,8 @@ fn pre_008_source_surface_adds_one_latest_value_snapshot_watch_without_backend_o
|
||||
"ksp_store_postgres_lib::",
|
||||
"ksp_onchain_transport_lib::",
|
||||
"ForceRehydrate",
|
||||
"source_failed",
|
||||
"drain_timeout",
|
||||
"ksp_config_lib::",
|
||||
"reqwest::",
|
||||
] {
|
||||
assert!(
|
||||
!root.contains(forbidden)
|
||||
@@ -96,7 +102,7 @@ fn pre_008_source_surface_adds_one_latest_value_snapshot_watch_without_backend_o
|
||||
&& !admission.contains(forbidden)
|
||||
&& !persistence.contains(forbidden)
|
||||
&& !snapshot.contains(forbidden),
|
||||
"pre.008 crossed a forbidden runtime boundary: {forbidden}"
|
||||
"pre.009 crossed a forbidden runtime boundary: {forbidden}"
|
||||
);
|
||||
}
|
||||
assert_eq!(runtime.matches("tokio::sync::watch::channel").count(), 2, "runtime retains only the external-control and private-source stop watches");
|
||||
|
||||
Reference in New Issue
Block a user