[tests] Lint on Linux: the Unix client before the test module, a Target type for the fuzz table, is_multiple_of; rustfmt 1.100 layout of core::pki
This commit is contained in:
+12
-12
@@ -461,6 +461,18 @@ pub async fn https_pipelined(
|
||||
pipelined_on(s, reqs, Duration::from_secs(3)).await
|
||||
}
|
||||
|
||||
/// One request over a fresh connection to a Unix socket (edge's proxy socket, control's UI
|
||||
/// socket).
|
||||
#[cfg(unix)]
|
||||
pub async fn unix(path: &std::path::Path, req: &Req) -> io::Result<Resp> {
|
||||
tokio::time::timeout(TIMEOUT, async {
|
||||
let s = tokio::net::UnixStream::connect(path).await?;
|
||||
send(s, req).await
|
||||
})
|
||||
.await
|
||||
.map_err(|_| io::Error::new(io::ErrorKind::TimedOut, "request timed out"))?
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod pipeline_tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
@@ -489,15 +501,3 @@ mod pipeline_tests {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// One request over a fresh connection to a Unix socket (edge's proxy socket, control's UI
|
||||
/// socket).
|
||||
#[cfg(unix)]
|
||||
pub async fn unix(path: &std::path::Path, req: &Req) -> io::Result<Resp> {
|
||||
tokio::time::timeout(TIMEOUT, async {
|
||||
let s = tokio::net::UnixStream::connect(path).await?;
|
||||
send(s, req).await
|
||||
})
|
||||
.await
|
||||
.map_err(|_| io::Error::new(io::ErrorKind::TimedOut, "request timed out"))?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user