chore & fix: rm debug statements and sleep for 10s
This commit is contained in:
parent
4fb5f350e1
commit
6078953faa
1 changed files with 4 additions and 8 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue