From 6078953faa1c5305ef0f7a098397ba0b79dbff8c Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 27 Sep 2023 16:35:46 +0530 Subject: [PATCH] chore & fix: rm debug statements and sleep for 10s --- src/docker_compose.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/docker_compose.rs b/src/docker_compose.rs index df04d94..c33efa3 100644 --- a/src/docker_compose.rs +++ b/src/docker_compose.rs @@ -68,7 +68,7 @@ impl DockerCompose { pub fn logs(&self, service: &str) -> String { Docker::get_logs(service) - } + } pub fn down(&self, remove_orphans: bool, volumes: bool) { let mut opts = vec!["down"]; @@ -88,7 +88,6 @@ impl DockerCompose { } } - #[cfg(test)] mod tests { use super::*; @@ -100,14 +99,11 @@ mod tests { assert!(cmp.services().is_empty()); cmp.up(); let services = cmp.services(); - std::thread::sleep(std::time::Duration::new(5, 0)); + std::thread::sleep(std::time::Duration::new(10, 0)); assert_eq!(services.len(), 2); for service in services.iter() { - println!("{}", service.name); - let logs = cmp.logs(&service.name); - println!("service: {} {:?}", service.name, logs); - println!("expecting: NAME={}", service.name); - assert!(logs.contains(&format!("NAME={}", service.name))); + let logs = cmp.logs(&service.name); + assert!(logs.contains(&format!("NAME={}", service.name))); } cmp.down(true, true); assert!(cmp.services().is_empty());