v0.3.11-pre.003
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker skeleton.
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
#[test]
|
||||
fn pre_002_manifest_dependency_surface_is_exact() {
|
||||
@@ -46,28 +46,26 @@ fn pre_002_manifest_keeps_forbidden_layers_and_live_sources_out() {
|
||||
] {
|
||||
assert!(!dependencies.contains(forbidden), "forbidden Worker dependency present: {forbidden}");
|
||||
}
|
||||
assert!(!manifest.contains("[dev-dependencies]"), "pre.002 requires no test-only dependency");
|
||||
assert!(!manifest.contains("[build-dependencies]"), "pre.002 requires no build dependency");
|
||||
assert!(!manifest.contains("[dev-dependencies]"), "foundation requires no test-only dependency");
|
||||
assert!(!manifest.contains("[build-dependencies]"), "foundation requires no build dependency");
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_002_crate_root_contains_no_runtime_behavior_or_public_contract_yet() {
|
||||
fn pre_003_source_surface_opens_identity_and_settings_without_runtime_behavior() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
for forbidden in [
|
||||
"pub mod ",
|
||||
"pub struct ",
|
||||
"pub enum ",
|
||||
"pub trait ",
|
||||
"pub fn ",
|
||||
"tokio::",
|
||||
"ksp_store_lib::",
|
||||
"ksp_raw_transaction_lib::",
|
||||
"ksp_worker_api::",
|
||||
"start(",
|
||||
"spawn(",
|
||||
for required in [
|
||||
"mod error;",
|
||||
"mod identity;",
|
||||
"mod settings;",
|
||||
"pub use self::error::ERROR_CODE_RAW_TRANSACTION_INGEST_SETTINGS_INVALID;",
|
||||
"pub use self::identity::RAW_TRANSACTION_INGEST_WORKER_KIND_CODE;",
|
||||
"pub use self::settings::RawTransactionIngestSettings;",
|
||||
] {
|
||||
assert!(!root.contains(forbidden), "pre.002 crate root opened behavior too early: {forbidden}");
|
||||
assert!(root.contains(required), "required pre.003 crate-root contract missing: {required}");
|
||||
}
|
||||
for forbidden in ["pub mod ", "tokio::", "start(", "spawn(", "JoinHandle", "JoinSet", "mpsc::", "watch::", "ksp_onchain_transport_lib::"] {
|
||||
assert!(!root.contains(forbidden), "pre.003 opened runtime behavior too early: {forbidden}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user