mirror of
https://github.com/zerotier/coyote.git
synced 2026-05-22 16:26:53 -07:00
make zlint be less stupid about the domains its processing
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This commit is contained in:
@@ -653,7 +653,7 @@ mod tests {
|
||||
assert_that!(res).is_ok();
|
||||
}
|
||||
|
||||
assert_that!(srv.zlint(dir.clone()).await).is_ok();
|
||||
assert_that!(srv.zlint("foo.com", dir.clone()).await).is_ok();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ mod tests {
|
||||
assert_that!(res).is_ok();
|
||||
}
|
||||
|
||||
assert_that!(srv.zlint(dir.clone()).await).is_ok();
|
||||
assert_that!(srv.zlint(domain, dir.clone()).await).is_ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-5
@@ -275,7 +275,11 @@ impl TestService {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn zlint(&self, certs: Arc<TempDir>) -> Result<(), ContainerError> {
|
||||
pub(crate) async fn zlint(
|
||||
&self,
|
||||
domain: &str,
|
||||
certs: Arc<TempDir>,
|
||||
) -> Result<(), ContainerError> {
|
||||
log::info!("letsencrypt dir: {}", certs.path().display());
|
||||
let name = &format!("zlint-{}", short_hash(make_nonce(None)));
|
||||
|
||||
@@ -292,10 +296,10 @@ impl TestService {
|
||||
.map(|c| c.to_string())
|
||||
.collect::<Vec<String>>(),
|
||||
),
|
||||
cmd: Some(vec![
|
||||
"set -e; for file in /etc/letsencrypt/live/*/fullchain.pem; do zlint $file; done"
|
||||
.to_string(),
|
||||
]),
|
||||
cmd: Some(vec![format!(
|
||||
"zlint /etc/letsencrypt/live/{}/fullchain.pem",
|
||||
domain
|
||||
)]),
|
||||
host_config: Some(HostConfig {
|
||||
binds: Some(vec![format!(
|
||||
"{}:{}",
|
||||
|
||||
Reference in New Issue
Block a user