feat: add unit test
! to be tested in a QEMU/KVM virtual machine, NOT bare metal !
This commit is contained in:
parent
20decab8a4
commit
51b9f1cbe9
1 changed files with 10 additions and 0 deletions
10
src/lib.rs
10
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()])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue