diff --git a/env/nginx_bind_le/src/lib.rs b/env/nginx_bind_le/src/lib.rs index 3547538..e90fc2b 100644 --- a/env/nginx_bind_le/src/lib.rs +++ b/env/nginx_bind_le/src/lib.rs @@ -59,6 +59,7 @@ impl Conductor for NginxBindLEConductor { } #[cfg(test)] mod tests { + use std::process::Stdio; use super::*; @@ -81,6 +82,18 @@ mod tests { path: "/var/www/website/".into(), }) .await; + + let out = tokio::process::Command::new("sudo") + .arg("nginx") + .arg("-T") + .stdout(Stdio::piped()) + .output() + .await + .unwrap(); + + let expected = format!("server_name {HOSTNAME}"); + let out = String::from_utf8(out.stdout).unwrap(); + assert!(out.contains(&expected)); c.process(EventType::DeleteSite { hostname: HOSTNAME.into(), })