From c55ebec16c8e37bec15b9d78c2297f00e8b83529 Mon Sep 17 00:00:00 2001 From: prplV Date: Wed, 30 Oct 2024 16:37:28 +0300 Subject: [PATCH] utils to get cid unit test --- src/utils.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index c2db430..cb36283 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -211,8 +211,17 @@ pub fn get_container_id() -> Option { Some(String::from_utf8_lossy(&output.stdout).to_string()) } Err(er) => { - println!("failed( : {}", er); None } } } + + +#[cfg(test)] +mod utils_unittests { + use super::get_container_id; + #[test] + fn check_if_container_id_can_be_grabed() { + assert!(get_container_id().is_some()); + } +}