which monitor is failing?
authorValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 18:56:13 +0000 (13:56 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 18:56:13 +0000 (13:56 -0500)
lightning-persister/src/lib.rs
lightning-persister/src/util.rs

index dd7a0d04d5b5e63c0df4c143d95cf66310bcfd8d..5889924491dac892011e4a157b9e78da10c43da8 100644 (file)
@@ -217,11 +217,13 @@ mod tests {
                                persisted_chan_data_0 = persister_0.load_channel_data(nodes[0].keys_manager).unwrap();
                                assert_eq!(persisted_chan_data_0.keys().len(), 1);
                                for mon in persisted_chan_data_0.values() {
+                                       println!("VMW: checking mon 0 update id:");
                                        assert_eq!(mon.get_latest_update_id(), $expected_update_id);
                                }
                                persisted_chan_data_1 = persister_1.load_channel_data(nodes[1].keys_manager).unwrap();
                                assert_eq!(persisted_chan_data_1.keys().len(), 1);
                                for mon in persisted_chan_data_1.values() {
+                                       println!("VMW: checking mon 1 update id:");
                                        assert_eq!(mon.get_latest_update_id(), $expected_update_id);
                                }
                        }
index 8f116963e773e9b5a6e396218b4a4f343d5927c5..ed3aa27e6101eb8ddd4d44fb06a1e233954073a7 100644 (file)
@@ -155,10 +155,10 @@ mod tests {
        // monitor's file. We induce this failure by making the `tmp` file a
        // directory.
        // Explanation: given "from" = the file being renamed, "to" = the
-       // renamee that already exists: Windows should fail because it'll fail
-       // whenever "to" is a directory, and Unix should fail because if "from" is a
+       // renamee that already exists: Unix should fail because if "from" is a
        // file, then "to" is also required to be a file.
        #[test]
+       #[cfg(not(target_os = "windows"))]
        fn test_rename_failure() {
                let test_writeable = TestWriteable{};
                let filename = "test_rename_failure_filename";
@@ -167,13 +167,9 @@ mod tests {
                fs::create_dir_all(get_full_filepath(path.to_string(), filename.to_string())).unwrap();
                match write_to_file(path.to_string(), filename.to_string(), &test_writeable) {
                        Err(e) => {
-                               println!("VMW: error in test_rename_failure: {:?}", e);
-                               #[cfg(not(target_os = "windows"))]
                                assert_eq!(e.kind(), io::ErrorKind::Other);
-                               #[cfg(target_os = "windows")]
-                               assert_eq!(e.kind(), io::ErrorKind::PermissionDenied);
                        }
-                       _ => panic!("Unexpected error message")
+                       _ => panic!("Unexpected Ok(())")
                }
                fs::remove_dir_all(path).unwrap();
        }