()
| 113 | |
| 114 | #[test] |
| 115 | fn recover_nonexistent_file() { |
| 116 | let dir = tempfile::tempdir().unwrap(); |
| 117 | let path = dir.path().join("nonexistent.wal"); |
| 118 | |
| 119 | let info = recover(&path).unwrap(); |
| 120 | assert_eq!(info.last_lsn, 0); |
| 121 | assert_eq!(info.record_count, 0); |
| 122 | } |
| 123 | |
| 124 | #[test] |
| 125 | fn recover_with_records() { |