Skip to content

Commit 32df539

Browse files
committed
fix(test): create the files
1 parent 43da969 commit 32df539

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/_utils.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ impl SampleWorkspace {
227227

228228
let file_path = if index <= half {
229229
let file_name = format!("link0-{index}.txt"); // file name from only-hardlinks/mixed
230-
temp.join("only-hardlinks/mixed").join(file_name)
230+
let file_path = temp.join("only-hardlinks/mixed").join(file_name);
231+
if let Err(error) = write_file(&file_path, "a".repeat(bytes_per_file)) {
232+
panic!("Failed to write {bytes_per_file} bytes to {file_path:?}: {error}");
233+
}
234+
file_path
231235
} else {
232236
let file_name = format!("file-{index}.txt"); // file name from some-hardlinks
233237
temp.join("some-hardlinks").join(file_name)

0 commit comments

Comments
 (0)