more test logs

This commit is contained in:
Igor Katson 2024-08-21 13:45:20 +01:00
parent ddc725d1a9
commit 73f4d7e453
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 14 additions and 4 deletions

View file

@ -7,6 +7,13 @@ use rand::{thread_rng, Rng, RngCore, SeedableRng};
use tempfile::TempDir;
use tracing::{debug, info};
pub fn setup_test_logging() {
if let Err(_) = std::env::var("RUST_LOG") {
std::env::set_var("RUST_LOG", "debug");
}
let _ = tracing_subscriber::fmt::try_init();
}
pub fn create_new_file_with_random_content(path: &Path, mut size: usize) {
let mut file = std::fs::OpenOptions::new()
.create_new(true)