Skip to content

Commit d3aeaf8

Browse files
fixup! Add a sample module FilesystemPersister.
1 parent ed6101f commit d3aeaf8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lightning-persister/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ mod tests {
255255
check_persisted_data!(11);
256256
}
257257

258-
// Windows ignores the read-only flag for folders.
258+
// Test that if the persister's path to channel data is read-only, writing
259+
// data to it fails. Windows ignores the read-only flag for folders, so this
260+
// test is Unix-only.
259261
#[cfg(not(target_os = "windows"))]
260262
#[test]
261263
fn test_readonly_dir() {
@@ -335,7 +337,9 @@ mod tests {
335337
}
336338
}
337339

338-
// Windows ignores the read-only flag for folders.
340+
// Test that if the persister's path to channel data is read-only, writing a
341+
// monitor to it results in the persister returning a PermanentFailure.
342+
// Windows ignores the read-only flag for folders, so this test is Unix-only.
339343
#[cfg(not(target_os = "windows"))]
340344
#[test]
341345
fn test_readonly_dir_perm_failure() {
@@ -376,6 +380,8 @@ mod tests {
376380
fs::set_permissions(path, perms).unwrap();
377381
}
378382

383+
// Test that if a persister's directory name is invalid, monitor persistence
384+
// will fail.
379385
#[cfg(target_os = "windows")]
380386
#[test]
381387
fn test_fail_on_open() {

0 commit comments

Comments
 (0)