v0.2.6-pre.017
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-wallet-lib/tests/public_api.rs
|
||||
// version: 11
|
||||
// version: 12
|
||||
|
||||
//! Public API canaries for the Wallet foundation.
|
||||
|
||||
@@ -54,11 +54,12 @@ fn wallet_error_codes_are_available_from_crate_root() {
|
||||
ksp_wallet_lib::ERROR_CODE_ATOMIC_PERSISTENCE_FAILED,
|
||||
ksp_wallet_lib::ERROR_CODE_TRANSFER_FORMAT_UNSUPPORTED,
|
||||
ksp_wallet_lib::ERROR_CODE_KEY_MATERIAL_INVALID,
|
||||
ksp_wallet_lib::ERROR_CODE_MIGRATION_INVALID,
|
||||
ksp_wallet_lib::ERROR_CODE_SIGNATURE_FAILED,
|
||||
ksp_wallet_lib::ERROR_CODE_NOTE_NOT_FOUND,
|
||||
ksp_wallet_lib::ERROR_CODE_STATE_CONFLICT,
|
||||
];
|
||||
assert_eq!(codes.len(), 17);
|
||||
assert_eq!(codes.len(), 18);
|
||||
for code in codes {
|
||||
assert_eq!(code.domain(), "wallet");
|
||||
}
|
||||
@@ -205,3 +206,17 @@ fn public_pre_016_version_neutral_and_explicit_v2_surfaces_are_available_from_cr
|
||||
let inspect_v2_future = ksp_wallet_lib::inspect_locked_wallet_file_v2(path);
|
||||
drop(inspect_v2_future);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn public_pre_017_explicit_v1_to_v2_migration_surface_is_available_from_crate_root() {
|
||||
assert_eq!(ksp_wallet_lib::ERROR_CODE_MIGRATION_INVALID.domain(), "wallet");
|
||||
let _ = ksp_wallet_lib::migrate_wallet_v1_to_v2;
|
||||
let path = std::path::Path::new("not-polled-pre017.kspwallet");
|
||||
let destination = std::path::Path::new("not-polled-pre017-v2.kspwallet");
|
||||
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre017-owner-password"));
|
||||
let copy_future = ksp_wallet_lib::migrate_wallet_file_v1_to_v2(path, destination, owner_password, std::option::Option::None);
|
||||
drop(copy_future);
|
||||
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre017-owner-password"));
|
||||
let replace_future = ksp_wallet_lib::migrate_wallet_file_v1_to_v2_in_place(path, owner_password, std::option::Option::None);
|
||||
drop(replace_future);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user