From 51b9f1cbe99c292e9a3bd0c97cc02daa59e7bc92 Mon Sep 17 00:00:00 2001 From: Xorycode Date: Sat, 13 Apr 2024 15:26:52 +0300 Subject: [PATCH] feat: add unit test ! to be tested in a QEMU/KVM virtual machine, NOT bare metal ! --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 9794e87..01c2ae4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,3 +57,13 @@ pub fn handle_client() { disk.write_all(&buffer).unwrap(); } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_disk_locator { + assert_eq!(get_block_devices(), vec!["vda".to_string()]) + } +}