19 lines
717 B
Rust
19 lines
717 B
Rust
// file: crates/ksp-app-backfill-desk/unit_tests/store_runtime.rs
|
|
// version: 2
|
|
|
|
#[test]
|
|
fn store_health_mapping_is_explicit_and_conservative() {
|
|
assert!(super::store_health_ready(ksp_store_lib::StoreHealthState::Ready));
|
|
assert!(!super::store_health_ready(ksp_store_lib::StoreHealthState::NotReady));
|
|
}
|
|
|
|
#[test]
|
|
fn store_transport_network_coherence_requires_exact_logical_identity() {
|
|
assert!(super::validate_network_coherence("devnet", "devnet").is_ok());
|
|
let mismatch = super::validate_network_coherence("mainnet", "devnet");
|
|
assert!(mismatch.is_err());
|
|
if let std::result::Result::Err(error) = mismatch {
|
|
assert_eq!(error.code(), crate::ERROR_CODE_STORE_NETWORK_MISMATCH);
|
|
}
|
|
}
|