Generates a random filename and its content for testing, and makes sure the file gets deleted during cleanup in case the test didn't do it on its own.
(&mut self)
| 573 | /// Generates a random filename and its content for testing, and makes sure the file gets |
| 574 | /// deleted during cleanup in case the test didn't do it on its own. |
| 575 | pub(crate) fn random_file(&mut self) -> (String, Vec<u8>) { |
| 576 | let filename = format!("file-{}", rand::random::<u64>()); |
| 577 | let content = format!("Test content for {}", filename); |
| 578 | (filename, content.into_bytes()) |
| 579 | } |
| 580 | } |
| 581 | } |
| 582 |