Skip to content

Commit f391296

Browse files
committed
f Drop all flags
1 parent c111d87 commit f391296

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

lightning-persister/src/fs_store.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -523,17 +523,15 @@ mod tests {
523523

524524
#[test]
525525
fn test_data_migration() {
526-
for move_data in [true, false] {
527-
let mut source_temp_path = std::env::temp_dir();
528-
source_temp_path.push("test_data_migration_source");
529-
let mut source_store = FilesystemStore::new(source_temp_path);
526+
let mut source_temp_path = std::env::temp_dir();
527+
source_temp_path.push("test_data_migration_source");
528+
let mut source_store = FilesystemStore::new(source_temp_path);
530529

531-
let mut target_temp_path = std::env::temp_dir();
532-
target_temp_path.push("test_data_migration_target");
533-
let mut target_store = FilesystemStore::new(target_temp_path);
530+
let mut target_temp_path = std::env::temp_dir();
531+
target_temp_path.push("test_data_migration_target");
532+
let mut target_store = FilesystemStore::new(target_temp_path);
534533

535-
do_test_data_migration(&mut source_store, &mut target_store, move_data);
536-
}
534+
do_test_data_migration(&mut source_store, &mut target_store);
537535
}
538536

539537
#[test]

lightning-persister/src/test_utils.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub(crate) fn do_read_write_remove_list_persist<K: KVStore + RefUnwindSafe>(kv_s
6363
}
6464

6565
pub(crate) fn do_test_data_migration<S: MigratableKVStore, T: MigratableKVStore>(
66-
source_store: &mut S, target_store: &mut T, move_data: bool,
66+
source_store: &mut S, target_store: &mut T,
6767
) {
6868
// We fill the source with some bogus keys.
6969
let primary_namespace_base = "testspace".to_string();
@@ -100,10 +100,7 @@ pub(crate) fn do_test_data_migration<S: MigratableKVStore, T: MigratableKVStore>
100100
let all_keys = source_store.list_all_keys().unwrap();
101101
assert_eq!(all_keys.len(), total_num_entries);
102102

103-
migrate_kv_store_data(source_store, target_store, true, move_data).unwrap();
104-
if move_data {
105-
assert_eq!(source_store.list_all_keys().unwrap().len(), 0);
106-
}
103+
migrate_kv_store_data(source_store, target_store).unwrap();
107104

108105
assert_eq!(target_store.list_all_keys().unwrap().len(), total_num_entries);
109106
for (p, s, k) in &all_keys {

0 commit comments

Comments
 (0)