Skip to content

Commit

Permalink
fixup! Add docker check step to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofl committed Jan 2, 2025
1 parent 96280f7 commit e6f1e4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/servers/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl DHCPRunner for Server {
#[cfg(test)]
mod tests {
use testcontainers::{runners::SyncRunner, GenericImage};
use std::env;
use std::sync::Once;
use std::process::Command;

Expand All @@ -92,13 +93,14 @@ mod tests {
// "Docker service is not running"
// );

let dir = std::env::current_dir().unwrap().join("docker");
let cwd = env::var("CARGO_MANIFEST_DIR").unwrap();

let _out = Command::new("docker")
.arg("compose")
.arg("build")
.current_dir(dir.clone())
.current_dir(format!("{cwd}/docker/"))
.output()
.expect(&format!("Failed to execute command. Check directory {}", dir.display()));
.expect(&format!("Failed to execute command. Check directory {}", cwd));

// println!("{}", String::from_utf8_lossy(&output.stdout));
});
Expand Down

0 comments on commit e6f1e4d

Please sign in to comment.