]> git.bitcoin.ninja Git - rust-lightning/commitdiff
f Use test-specific temp dir
authorElias Rohrer <dev@tnull.de>
Tue, 22 Aug 2023 14:45:09 +0000 (16:45 +0200)
committerElias Rohrer <dev@tnull.de>
Wed, 23 Aug 2023 10:37:23 +0000 (12:37 +0200)
... as otherwise we'll remove the entire temp dir on drop.

lightning-persister/src/fs_store.rs

index 76ec93a9a294c71babc0d527eb864b3aea4a79c2..e1fd9811bcd8a19fd697bc429bdc291533140c4f 100644 (file)
@@ -301,7 +301,8 @@ mod tests {
 
        #[test]
        fn read_write_remove_list_persist() {
-               let temp_path = std::env::temp_dir();
+               let mut temp_path = std::env::temp_dir();
+               temp_path.push("test_read_write_remove_list_persist");
                let fs_store = FilesystemStore::new(temp_path);
                do_read_write_remove_list_persist(&fs_store);
        }