v0.3.6-pre.006
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-job-backfill-lib/tests/public_api.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Public API canaries for the bounded Backfill foundation.
|
||||
//! Public API canaries for bounded Backfill discovery and RAW v1 conversion.
|
||||
|
||||
#[test]
|
||||
fn pre_005_request_scope_and_discovery_contracts_are_available_from_crate_root() {
|
||||
@@ -64,3 +64,25 @@ fn pre_005_candidate_identity_is_network_plus_signature_not_transport_source() {
|
||||
assert_ne!(mainnet_identity, devnet_identity);
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_raw_conversion_contract_is_available_from_crate_root() {
|
||||
assert_eq!(ksp_job_backfill_lib::RAW_TRANSACTION_FORMAT_ID, "ksp.solana.raw_transaction");
|
||||
assert_eq!(ksp_job_backfill_lib::RAW_TRANSACTION_FORMAT_VERSION, 1);
|
||||
let signature = ksp_job_backfill_lib::BackfillSignature::new("1".repeat(64));
|
||||
assert!(signature.is_ok());
|
||||
let signature = match signature {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(_) => return,
|
||||
};
|
||||
let decoded = signature.to_raw_transaction_signature();
|
||||
assert!(decoded.is_ok());
|
||||
if let std::result::Result::Ok(decoded) = decoded {
|
||||
assert_eq!(decoded.as_bytes(), &[0_u8; 64]);
|
||||
}
|
||||
let _hydrate = ksp_job_backfill_lib::hydrate_backfill_candidate;
|
||||
let _outcome: std::option::Option<ksp_job_backfill_lib::BackfillHydrationOutcome> = std::option::Option::None;
|
||||
let _acquisition: std::option::Option<ksp_job_backfill_lib::BackfillRawAcquisition> = std::option::Option::None;
|
||||
assert_eq!(ksp_job_backfill_lib::ERROR_CODE_BACKFILL_RAW_CONVERSION_INVALID, ksp_core_lib::ErrorCode::new("job_backfill", "raw_conversion_invalid"));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user