v0.3.15-pre.006
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/release_completeness.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! Release-completeness canaries for the Raw Transaction Ingest Desk scaffold tranche.
|
||||
//! Release-completeness canaries for Raw Transaction Ingest Desk Config-only route inventory.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![deny(unreachable_pub)]
|
||||
@@ -21,7 +21,7 @@ fn read_text(path: &std::path::Path) -> String {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_005_production_module_inventory_is_exact_and_scaffold_only() {
|
||||
fn pre_006_production_module_inventory_adds_only_route_inventory_to_the_scaffold() {
|
||||
let lib = read_text(app_root().join("src/lib.rs").as_path());
|
||||
let expected = [
|
||||
"mod app_state;",
|
||||
@@ -32,6 +32,7 @@ fn pre_005_production_module_inventory_is_exact_and_scaffold_only() {
|
||||
"mod errors;",
|
||||
"mod frontend_logging;",
|
||||
"mod logging_runtime;",
|
||||
"mod route_inventory;",
|
||||
"mod splash;",
|
||||
"mod tauri;",
|
||||
"mod tw_main;",
|
||||
@@ -44,14 +45,14 @@ fn pre_005_production_module_inventory_is_exact_and_scaffold_only() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_005_public_surface_exposes_only_application_run_entry_point() {
|
||||
fn pre_006_public_surface_still_exposes_only_application_run_entry_point() {
|
||||
let lib = read_text(app_root().join("src/lib.rs").as_path());
|
||||
let public_reexports = lib.lines().filter(|line| return line.starts_with("pub use ")).collect::<std::vec::Vec<_>>();
|
||||
assert_eq!(public_reexports, vec!["pub use self::tauri::run;"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_005_scaffold_keeps_start_stop_inventory_and_runtime_for_later_tranches() {
|
||||
fn pre_006_config_inventory_keeps_start_stop_and_runtime_resources_for_later_tranches() {
|
||||
let app = read_text(app_root().join("src/app_state.rs").as_path());
|
||||
let tauri = read_text(app_root().join("src/tauri.rs").as_path());
|
||||
for forbidden in [
|
||||
@@ -68,3 +69,22 @@ fn pre_005_scaffold_keeps_start_stop_inventory_and_runtime_for_later_tranches()
|
||||
assert!(!tauri.contains(forbidden));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_inventory_source_is_config_only_and_contains_all_five_capability_requirements() {
|
||||
let inventory = read_text(app_root().join("src/route_inventory.rs").as_path());
|
||||
for required in [
|
||||
"WsSubscriptionKind::Logs",
|
||||
"WsSubscriptionKind::Block",
|
||||
"WsSubscriptionKind::HeliusTransaction",
|
||||
"getTransaction",
|
||||
"getBlocksWithLimit",
|
||||
"MissingYellowstoneGrpc",
|
||||
"MissingRequiredSecret",
|
||||
] {
|
||||
assert!(inventory.contains(required), "missing pre.006 inventory requirement {required}");
|
||||
}
|
||||
for forbidden in ["connect(", "Store::open", "start_with_runtime_resources", "request_stop"] {
|
||||
assert!(!inventory.contains(forbidden), "pre.006 inventory performs premature runtime operation {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user