diff --git a/src/agent/rustjail/src/mount.rs b/src/agent/rustjail/src/mount.rs index 15bc039c93..8bb3b47256 100644 --- a/src/agent/rustjail/src/mount.rs +++ b/src/agent/rustjail/src/mount.rs @@ -1411,7 +1411,7 @@ mod tests { for (i, t) in tests.iter().enumerate() { // Create a string containing details of the test - let msg = format!("test[{}]: {:?}", i, t); + let msg = format!("test[{}]: {:?}", i, t.name); // if is_symlink, then should be prepare the softlink environment if t.symlink_path != "" { diff --git a/src/agent/src/util.rs b/src/agent/src/util.rs index 0e262e7ee3..8761f45885 100644 --- a/src/agent/src/util.rs +++ b/src/agent/src/util.rs @@ -86,7 +86,6 @@ mod tests { #[derive(Debug, Default, Clone)] struct BufWriter { data: Arc>>, - slow_write: bool, write_delay: Duration, } @@ -94,7 +93,6 @@ mod tests { fn new() -> Self { BufWriter { data: Arc::new(Mutex::new(Vec::::new())), - slow_write: false, write_delay: Duration::new(0, 0), } } @@ -173,45 +171,35 @@ mod tests { #[derive(Debug)] struct TestData { reader_value: String, - result: io::Result, } let tests = &[ TestData { reader_value: "".into(), - result: Ok(0), }, TestData { reader_value: "a".into(), - result: Ok(1), }, TestData { reader_value: "foo".into(), - result: Ok(3), }, TestData { reader_value: "b".repeat(BUF_SIZE - 1), - result: Ok((BUF_SIZE - 1) as u64), }, TestData { reader_value: "c".repeat(BUF_SIZE), - result: Ok((BUF_SIZE) as u64), }, TestData { reader_value: "d".repeat(BUF_SIZE + 1), - result: Ok((BUF_SIZE + 1) as u64), }, TestData { reader_value: "e".repeat((2 * BUF_SIZE) - 1), - result: Ok(((2 * BUF_SIZE) - 1) as u64), }, TestData { reader_value: "f".repeat(2 * BUF_SIZE), - result: Ok((2 * BUF_SIZE) as u64), }, TestData { reader_value: "g".repeat((2 * BUF_SIZE) + 1), - result: Ok(((2 * BUF_SIZE) + 1) as u64), }, ];