Expose typed Prepared Lower failures

This commit is contained in:
ms2k 2026-07-19 03:18:50 +09:00
commit 30cd36dcdd

View file

@ -15,7 +15,7 @@ use lazaret_core::identity::{
use lazaret_core::records::{PrepareOperation, PrepareStageState};
use lazaret_prepared_lower::{
IdMap, IdMapRange, PrepareRecovery, PrepareRequest, PreparedDestination,
PreparedDestinationKind, PreparedLowerStore, ReclaimOutcome,
PreparedDestinationKind, PreparedLowerError, PreparedLowerStore, ReclaimOutcome,
};
use lazaret_storage_catalog::{Catalog, CatalogError};
use serde_json::json;
@ -81,7 +81,10 @@ fn preexisting_fixed_children_require_exact_private_mode() {
)
.unwrap();
assert!(
PreparedLowerStore::initialize(&fixture.root, fixture.catalog.clone()).is_err(),
matches!(
PreparedLowerStore::initialize(&fixture.root, fixture.catalog.clone()),
Err(PreparedLowerError::Confinement { .. })
),
"accepted wrong mode for {name}"
);
}