v0.3.2-pre.003-fix.001

This commit is contained in:
2026-08-29 17:47:22 +02:00
parent a8c90107b5
commit 0a8fb5dd1b
6 changed files with 166 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-lib/tests/dependency_boundary.rs
// version: 3
// version: 4
#![warn(missing_docs)]
#![deny(unreachable_pub)]
@@ -39,7 +39,17 @@ fn pre_003_facade_adds_only_backend_neutral_settings_lifecycle_and_api_reexports
assert!(crate_root.contains("pub use self::store::Store;"));
assert!(crate_root.contains("pub use ksp_store_api::RawTransaction;"));
assert!(crate_root.contains("const _: &str = crate::TRACING_TARGET;"));
for forbidden in ["pub mod ", "pub use ksp_store_postgres_lib", "tokio_postgres", "deadpool_postgres", "rustls::", "Pool", "Client", "Row", "Statement"] {
for forbidden in [
"pub mod ",
"pub use ksp_store_postgres_lib",
"tokio_postgres",
"deadpool_postgres",
"rustls::",
"deadpool::managed::Pool",
"tokio_postgres::Client",
"tokio_postgres::Row",
"tokio_postgres::Statement",
] {
assert!(!crate_root.contains(forbidden), "forbidden physical backend facade surface detected: {forbidden}");
}
let production = format!("{}\n{}", include_str!("../src/settings.rs"), include_str!("../src/store.rs"));

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-lib/tests/feature_mismatch.rs
// version: 1
// version: 2
#![warn(missing_docs)]
#![deny(unreachable_pub)]
@@ -32,7 +32,7 @@ fn settings() -> ksp_store_lib::StoreSettings {
fn pre_003_known_postgres_without_feature_returns_stable_error_before_io() {
let result = poll_ready(ksp_store_lib::Store::open(settings()));
let error = result.err();
assert_eq!(error.map(|value| value.code()), std::option::Option::Some(ksp_store_lib::ERROR_CODE_BACKEND_NOT_COMPILED));
assert_eq!(error.map(|value| return value.code()), std::option::Option::Some(ksp_store_lib::ERROR_CODE_BACKEND_NOT_COMPILED));
return;
}
@@ -41,6 +41,6 @@ fn pre_003_known_postgres_without_feature_returns_stable_error_before_io() {
fn pre_003_compiled_postgres_path_refuses_to_fake_readiness_before_pre_005() {
let result = poll_ready(ksp_store_lib::Store::open(settings()));
let error = result.err();
assert_eq!(error.map(|value| value.code()), std::option::Option::Some(ksp_store_lib::ERROR_CODE_BACKEND_OPEN_FAILED));
assert_eq!(error.map(|value| return value.code()), std::option::Option::Some(ksp_store_lib::ERROR_CODE_BACKEND_OPEN_FAILED));
return;
}