chore: fix tests on mac
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
87156b5fbb
commit
154c379855
|
@ -770,16 +770,17 @@ mod test {
|
|||
fn test_update() {
|
||||
// Prepare temporary filesystem structure
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let temp_dir_path = temp_dir.path().canonicalize().unwrap();
|
||||
|
||||
let file_path = temp_dir.path().join("my-temporary-note.txt");
|
||||
let file_path = temp_dir_path.join("my-temporary-note.txt");
|
||||
let mut tmp_file = File::create(file_path).unwrap();
|
||||
writeln!(tmp_file, "Brian was here. Briefly.").unwrap();
|
||||
|
||||
let file_path = temp_dir.path().join("hello-world.txt");
|
||||
let file_path = temp_dir_path.join("hello-world.txt");
|
||||
let mut tmp_file = File::create(file_path).unwrap();
|
||||
writeln!(tmp_file, "Hello, World!").unwrap();
|
||||
|
||||
let file_path = temp_dir.path().join("empty");
|
||||
let file_path = temp_dir_path.join("empty");
|
||||
File::create(file_path).unwrap();
|
||||
|
||||
// Initialize database
|
||||
|
@ -807,16 +808,17 @@ mod test {
|
|||
fn _test_rescan(quick: bool) {
|
||||
// Prepare temporary filesystem structure
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let temp_dir_path = temp_dir.path().canonicalize().unwrap();
|
||||
|
||||
let file_path = temp_dir.path().join("my-temporary-note.txt");
|
||||
let file_path = temp_dir_path.join("my-temporary-note.txt");
|
||||
let mut tmp_file = File::create(file_path).unwrap();
|
||||
writeln!(tmp_file, "Brian was here. Briefly.").unwrap();
|
||||
|
||||
let file_path = temp_dir.path().join("hello-world.txt");
|
||||
let file_path = temp_dir_path.join("hello-world.txt");
|
||||
let mut tmp_file = File::create(file_path).unwrap();
|
||||
writeln!(tmp_file, "Hello, World!").unwrap();
|
||||
|
||||
let empty_path = temp_dir.path().join("empty");
|
||||
let empty_path = temp_dir_path.join("empty");
|
||||
File::create(&empty_path).unwrap();
|
||||
|
||||
// Initialize database
|
||||
|
@ -852,7 +854,7 @@ mod test {
|
|||
});
|
||||
|
||||
// Remove a file
|
||||
std::fs::remove_file(temp_dir.path().join("hello-world.txt")).unwrap();
|
||||
std::fs::remove_file(temp_dir_path.join("hello-world.txt")).unwrap();
|
||||
|
||||
let job = job_container.add_job("RESCAN", "TEST JOB").unwrap();
|
||||
let rescan_result = store.rescan_vault(&open_result.db, job, quick, false);
|
||||
|
|
Loading…
Reference in New Issue