v0.2.5-pre.006-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-wallet-lib/unit_tests/persistence.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
fn temp_directory() -> std::io::Result<tempfile::TempDir> {
|
||||
return tempfile::tempdir();
|
||||
@@ -86,7 +86,7 @@ fn public_file_create_and_locked_inspect_round_trip_without_revealing_identity()
|
||||
let directory = temp_directory().expect("Wallet persistence test directory must be creatable");
|
||||
let destination = directory.path().join("created.kspwallet");
|
||||
let runtime = tokio::runtime::Builder::new_current_thread().build().expect("Wallet persistence test runtime must build");
|
||||
let owner_password = crate::OwnerPassword::new("pre006-owner-password").expect("test OWNER password must be valid");
|
||||
let owner_password = crate::OwnerPassword::new(std::string::String::from("pre006-owner-password"));
|
||||
let created = runtime
|
||||
.block_on(crate::create_wallet_file_v1(destination.as_path(), owner_password, std::option::Option::None, crate::WalletCreateMetadataV1::default()))
|
||||
.expect("native Wallet file creation must succeed");
|
||||
@@ -95,7 +95,7 @@ fn public_file_create_and_locked_inspect_round_trip_without_revealing_identity()
|
||||
assert!(!locked.view_enabled());
|
||||
assert_eq!(created.capability(), crate::WalletCapability::Owner);
|
||||
assert!(destination.exists());
|
||||
let second_password = crate::OwnerPassword::new("pre006-other-owner-password").expect("second test OWNER password must be valid");
|
||||
let second_password = crate::OwnerPassword::new(std::string::String::from("pre006-other-owner-password"));
|
||||
let second = runtime.block_on(crate::create_wallet_file_v1(
|
||||
destination.as_path(),
|
||||
second_password,
|
||||
@@ -113,11 +113,11 @@ fn persisted_full_vector_opens_view_and_owner_through_file_apis() {
|
||||
crate::persistence::persist_new_wallet_for_test(destination.as_path(), vector).expect("full vector must publish through no-clobber persistence");
|
||||
|
||||
let runtime = tokio::runtime::Builder::new_current_thread().build().expect("Wallet persistence test runtime must build");
|
||||
let view_password = crate::ViewPassword::new("pre005-view-password").expect("test VIEW password must be valid");
|
||||
let view_password = crate::ViewPassword::new(std::string::String::from("pre005-view-password"));
|
||||
let view = runtime
|
||||
.block_on(crate::open_wallet_view_file_v1(destination.as_path(), view_password))
|
||||
.expect("persisted full vector must open through VIEW file API");
|
||||
let owner_password = crate::OwnerPassword::new("pre005-owner-password").expect("test OWNER password must be valid");
|
||||
let owner_password = crate::OwnerPassword::new(std::string::String::from("pre005-owner-password"));
|
||||
let owner = runtime
|
||||
.block_on(crate::open_wallet_owner_file_v1(destination.as_path(), owner_password))
|
||||
.expect("persisted full vector must open through OWNER file API");
|
||||
|
||||
Reference in New Issue
Block a user